How to get only Parent categories in supreme theme

This topic contains 8 replies, has 3 voices, and was last updated by  Romit Solanki 5 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #429802

    Romit Solanki
    Expired Member
    Post count: 40

    how do I get only parent categories in a Supreme theme? Attaching screenshots.

    #429811

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    It is possible to hide some categories with CSS, but there are no options for showing only parent categories: https://wpgeodirectory.com/support/topic/front-page-popular-categories-supreme-theme/#post-388162

    There is a way to customize it, though, but if you edit the child theme then changes will be overwritten on update of the theme.
    Edit the following file: Edit the following file /wp-content/themes/supreme-directory/inc/geodirectory-compatibility.php on line #1116

    
    
    
    echo do_shortcode('[gd_popular_post_category category_limit=5]');

    and change it to

    
    
    
    echo do_shortcode('[gd_popular_post_category category_limit=5 parent_only=true]');
    
    #429845

    Romit Solanki
    Expired Member
    Post count: 40

    thanks, Alex, I have updated above code but still getting all Categories in home page. Attaching screenshot .could you please check?

    #429866

    Kiran
    Moderator
    Post count: 7069

    Hi Romit,

    I have checked one of our test site and it working fine. Please provide us your site url and admin credentials, so we can take a look.

    Kiran

    #429869

    Romit Solanki
    Expired Member
    Post count: 40
    This reply has been marked as private.
    #429896

    Kiran
    Moderator
    Post count: 7069

    Hello Romit,

    I added parent_only=1 to shortcode in the file inc/geodirectory-compatibility.php .
    Now it is showing patent categories only.

    Kiran

    #429908

    Romit Solanki
    Expired Member
    Post count: 40

    Thanks Kiran.

    #429931

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #430163

    Romit Solanki
    Expired Member
    Post count: 40

    Sure

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket