Viewing 9 posts - 1 through 9 (of 9 total)

Display different categories in home page tabs

Hello, what query should I use to display different category listings in each tab on home page. For example category ID is 50. Thanks.

Created: October 15, 2013 at 4:52 pm

  • Tomislav
    October 15, 2013 at 9:30 pm

    Nobody knows what query is used to display listings by category? I never needed that so far, and something that I tried didn’t work. For example $query = new WP_Query( ‘cat=50’ ); It displays all listings, not just for that category.

  • Ian
    October 16, 2013 at 1:10 am

    In the query string box?

    How about


  • Tomislav
    October 16, 2013 at 1:56 pm

    Great, that’s the query I needed.

    Thanks Ian.

  • Sandra
    January 7, 2014 at 4:45 pm

    Thank you so much Ian, that worked for me. (And I figured out the short code bit myself which I’m a little proud of as I am a complete blind mouse when it comes to code etc). So cheers 🙂

  • Gil Bechtel
    Gil Bechtel
    August 23, 2015 at 11:28 pm

    I have tried several of the codes that I found searching the forums and none of them have worked, the above code at least gives me a blank return, I’m confused what if anything goes after cat_name?

    [code title=””]&taxonomy=listing&term=cat_name&tag_ID=57[/code]
    [code title=””]&taxonomy=listing&term=cat_name=57[/code]

    I have also tried the short code [LISTINGS=57] in the HTML section with no luck

  • Josh
    August 24, 2015 at 7:12 am

    @Gilbert Where are you trying to display your listings?If its a page then try this
    [code title=””][LISTINGS cat=’1′ orderby=’post_title’ order=’desc’ show=10][/code]
    replace the 1 with your category ID >>

  • Gil Bechtel
    Gil Bechtel
    August 24, 2015 at 9:38 pm

    It was in a tab, that worked, thank you!

  • Josh
    August 25, 2015 at 1:09 pm

    You’re welcome.Good day 🙂

Copyright © 2010-2020 PremiumPress Limited.

secure payments