Running a query before the query
-
Hi Guys,
I did a website design, then incorporated WP. I have a new section in the left sidebar, which I use query_posts for, but this is then messing up the main section.
Obviously I only want the news preview on the main pages of the site, not on the blog and posts, so I am using if (is_page()) :. I am using static homepage, so you can see what I am talking about here:
http://county-hotel-stoneykirk.com/
There is meant to be a 3 paragraph block of text between the main img and the 3 columns (contact, map, services), which is stored in the page named home, but it is dissappearing because of the news section in the sidebar — it works fine when I take out the sidebar news preview.
Is there anyway I can run a query to get my two latest posts into my news section in the sidebar of the pages, and then respool the original query (maybe store the array from the original query to a cookie – just occured to me, but how to access the array).. I have tried rewind_posts but it is not having the desired effect.
The topic ‘Running a query before the query’ is closed to new replies.