Support » Plugins » Hacks » How to add a filter to only show certain authors.

  • Hello,

    My company is trying to add a way of filtering posts so that you can see only posts from certain authors, certain dates, etc.

    Right now what I have working is that within the loop I am checking every time to see if it is the correct person.. the problem is that if I start with 20 posts and filter out only the ones that match certain criteria then I end up with only a few or possibly even none that match.

    Any thoughts as to a better way to do it? I’m guessing that using wp_query might be helpful but not sure where to put it.


Viewing 1 replies (of 1 total)
  • Are you thinking more along the lines of like a custom page or something? Take the authors pages for instance, it pulls posts specifically form that one author.

    However, if you have a single custom page and want multiple content filters like say one section of the page would pull posts from Jane Doe, and another section would pull content from 01/01/2000 – 01/02/2011 then you would need two WP_Query calls.

    More info on WP_Query() »

Viewing 1 replies (of 1 total)
  • The topic ‘How to add a filter to only show certain authors.’ is closed to new replies.