• Resolved jamminjames

    (@jamminjames)


    We really need to be able to filter for a category in the Post Loop (carousel) widget on the home page. I’m surprised this isn’t included as a choice in the widget.

    It’s weird, because we have a function added in our child theme functions.php file to filter for one category on the home page, yet it is being ignored.

    I also tried adding the line query_posts( array ( 'category_name' => 'news') ); as suggested by your theme where it says “Additional query arguments. See query_posts.” It had no effect.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I have the same problem!! did you solve it?

    Thread Starter jamminjames

    (@jamminjames)

    No. Got no response from Vantage.

    Thread Starter jamminjames

    (@jamminjames)

    Okay, I got a response. All you have to do is insert “cat=x” (without quotes) where x is the category ID you want to include, and nothing else. I tried it and it works.

    That goes in the Edit Post Loop (PB) Widget area, in the ‘Additional’ field. There is a note there saying “Additional query arguments. See query_posts,” however, the link is really not relevant, as you don’t need any complex code there, just the cat=x. You can also use commas to add more categories, as in cat=x,y,z.

    One side effect, however, is it seems to cancel out the ‘sticky’ designation on a post. A post marked as ‘sticky’ no longer stays as the first article, but is arranged by date.

    Thanks jamminjames! This worked for me originally, then after ‘some’ update, it was including all my posts. Been banging my head for a bit now, appreciate the relief!
    Removing the extra code worked for me.

    I had originally:
    query_posts( ‘cat=5’ );

    Then updated to:
    cat=5

    worked like a charm.
    Props!
    Patrick

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Filter for category in Post Loop (carousel) widget?’ is closed to new replies.