• I am trying to use get_posts to pull the five most recent posts from two categories on my front page. Using:

    get_posts(‘numberposts=5&offset=0&category=5,6’)

    it only pulls back categroy 5. Am I missing something really obvious?

Viewing 1 replies (of 1 total)
  • Do you want five from one category and then five from the other? If so use two get_posts line, one for each category.

    If you want the five latest post placed in either category 5 or 6 try

    get_posts(‘numberposts=5&offset=0&cat=5,6’)

    Let me know how you get on because I’m trying something similar!

Viewing 1 replies (of 1 total)
  • The topic ‘get_posts() only picking up one category’ is closed to new replies.