WordPress.org

Ready to get started?Download WordPress

Forums

Output list of post titles distinct from main loop (1 post)

  1. JimFitzsimons
    Member
    Posted 2 years ago #

    Hi, I hope someone can help. What I want to do sounds simple enough (and probably is... could be I've just been staring at the code for too long).

    Basically I want to output a list of all posts returned by a search query (using the standard WordPress search interface) in the site sidebar. Because my pages are set up to only show 5 posts, when I re-output the loop in the sidebar, I only get a list of the first 5 posts from the query (changing to the next 5 when I click the "older posts" navigation.

    So I want to output the loop once as standard (5 per page) and then re-output the same loop/query but as a list of all post titles.

    I've tried a fair few different things, but nothing has worked yet. I'm sure there must be a way of taking an existing query and simply changing the "posts_per_page" parameter. But how?

Topic Closed

This topic has been closed to new replies.

About this Topic