Forums

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

  1. JimFitzsimons
    Member
    Posted 8 months 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?

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 8 months ago by JimFitzsimons
  • This topic is not resolved
  • WordPress version: 3.2.1