WordPress.org

Ready to get started?Download WordPress

Forums

Custom query inside my loop (3 posts)

  1. nicosFR
    Member
    Posted 4 years ago #

    Hi !

    I want to make a custom query to fetch posts after my main post content is displayed. After that I just want the page to continue working as it is supposed to.

    Here is the code I use

    $temp = clone $wp_query;
    	query_posts($myargs);
    // here i do stuff, and it works
            $wp_query = clone $temp;

    But it doesn't seem to go back to my original query as comments for the initial posts etc... are not displayed, actually it still fetches the info from my custom query...

    What am I missing here ?

  2. MichaelH
    Member
    Posted 4 years ago #

    Place your theme's complete index.php in a pastebin such as http://wordpress.pastebin.ca/ and report the link back here.

    Maybe someone then can better help you.

    Thanks.

  3. Shane G
    Member
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.