And I get a blank page. So I am thinking it might be the second loop causing confusion and I might need to add <?php wp_reset_query(); ?> somewhere, but where? I tried before, after still just get a blank page. I must be missing something else, yes? Anyone?
The query_posts function is intended to be used to modify the main page Loop only. It is not intended as a means to create secondary Loops on the page. If you want to create separate Loops outside of the main one, you should create separate WP_Query objects and use those instead. Use of query_posts on Loops other than the main one can result in your main Loop becoming incorrect and possibly displaying things that you were not expecting.
The query_posts function overrides and replaces the main query for the page. To save your sanity, do not use it for any other purpose.
It’s pretty much equall to query_posts, except that it doesn’t override, do no need to rewind, reset or save the main loop.
You can just WP_Query something within a page that has a loop without inteferring or being limited by either.
If there’s any issues still, ofcourse we’re glad to answer any questions and help out with any questions, but seeing the code you got going in your first post I think you’ll get it done with WP_Query ;)
Yeah, you know the codex is a wonderful place and full of information that makes the assumption you know what you are doing. ;-)
For those of us trying to learn it can be frustrating though.
I did go through that info a month ago, tried to use it and when I posted on the wp support forums not a single answer. So I gave up on that idea. Then I found a post here in the snippets area that seemed to describe a simpler way to accomplish what I was after. When it didn’t work I posted here hoping to learn why.
In the meantime I did some more research and found some excellent explanations and more importantly examples using the $newquery = new function. 2 minutes later I had what I wanted up and live. I was also able to modify the example code and understand why, so I actually learned something.
Simply telling a coder in learning to read the codex may seem logical to an advanced coder, I guess.