[Resolved] Multiple Posts — Restoring first query
I searched the codex and existing posts. This one in particular seemed to be what I am looking for: http://wordpress.org/support/topic/267056?replies=5
1. Save the original query in a temp_query var
<?php $temp_query = clone $wp_query; ?>
2. Do a new WP_query to extract what I want and display these posts (just the titles)
<?php $my_query = new WP_Query(array(
3. Restore the original query so the comments associated with the original post can display
<?php $wp_query = clone $temp_query; ?>
However, I keep getting the comments of the last post in the new WP_query (in item 2)
Here is a link to my page: http://www.photoxels.com/canon-s90-review-digitalcamerareview/
There should be no comment associated with the post currently displayed. The 5 comments come from the last post from the table just before the comments.
Any help is appreciated. Thanks!
- The topic ‘[Resolved] Multiple Posts — Restoring first query’ is closed to new replies.