• Resolved randyttp

    (@randyttp)


    I want to display all posts where category is ‘quick-update'(slug).

    Can someone explain to me how?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    What theme are you using? Normally category.php or archive.php theme template files will show your category pages.

    Thread Starter randyttp

    (@randyttp)

    Its my own custom theme…

    I’m trying to write the php call function of get_posts for only a certain category.

    I can only find to specify a category by the id number. But I don’t know what the id number is.

    I know WP_query can specify by category slug name. But in this case I want to use get_posts()

    get_posts should be able to use the same arguments as WP_Query.

    Thread Starter randyttp

    (@randyttp)

    grr ok I figured it out.

    the codex said to use ‘category’

    but only ‘category_name’ would actually work. Ok got it. Thanks guys.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘get_posts where category is equal to…’ is closed to new replies.