Loop Queries Effecting Sidebar Queries
-
Hi, I’m pretty new to wordpress, so I’m not sure about all of it’s nuances.
I’m running a basic (no non-default plugins) setup as a CMS, writers website. I have two custom fields for each post. “Post Author” and “Featured Details”. There are a few catagories, Poetry, Prose, Editorial etc.
Basically my content and comments are displaying fine with The Loop. However I am using custom Archive Pages that use the
foreach($posts as $post) :
loop formatting, much like the main page, displaying page titles / author details within it as appropriate. However my sidebar uses
if (get_post_meta($post->ID, “Poem Author”, 1)) { etc }
To create a menu with “Authors Other Works” (another foreach) loop depending on the meta data. This is fine on pages belonging to that author, however on these custom archive pages it means that you have a list of “Other Works” for whoever was last on the Archive list. Whoever was last accessed by the loop. I don’t want this to happen. Is there anyway to separate loops from each other? Or do I need to find a different method of achieving this?
I hope I’m making sense. Thanks for your help.
Tom ~
- The topic ‘Loop Queries Effecting Sidebar Queries’ is closed to new replies.