Featured Area below search bar

This topic contains 14 replies, has 3 voices, and was last updated by  Anna 5 years, 9 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #464848

    Anna
    Full Member
    Post count: 70

    Hi there

    Firstly, thanks for such fantastic products 🙂

    Instead of ‘Popular Categories’ in the Featured Area below search bar, could these be replaced with CPT’s? I’ve created CPT’s with their own categories and sub-categories but I’d like to control what is displayed under the search bar, specifically using CPT’s (e.g. Businesses, Accommodation, See and Do etc.).

    Thanks in advance
    Matt

    #464854

    Kor
    Moderator
    Post count: 16516

    Hi Matt,

    Thanks for your reply. If you’ve CPT’s, switching the CPT’s on the search dropdown will change the categories below to the CPT categories. Check out the attached screenshot. You can test it here. https://wpgeo.directory/supreme-directory/ . Is this what you’re looking for?

    Thanks!

    #464873

    Anna
    Full Member
    Post count: 70
    This reply has been marked as private.
    #464882

    Anna
    Full Member
    Post count: 70
    This reply has been marked as private.
    #465155

    Kiran
    Moderator
    Post count: 7069

    Hello Matt,

    That search form & categories coming via shortcodes. See https://github.com/AyeCode/supreme-directory/blob/master/inc/geodirectory-compatibility.php#L590

    In v2 CPT Listings shortcode no longer supported. The site you provided for reference is v1. We will check and see if we can implement CPT Listings widget in v2 as well.

    Till then if you can you custom html to display CPTs instead of Categories under search bar.

    Kiran

    #466134

    Anna
    Full Member
    Post count: 70
    This reply has been marked as private.
    #466193

    Kiran
    Moderator
    Post count: 7069

    Hello Matt,

    Make sure you have categories available with listings. It is possible that you have not allowed child categories to display.

    We have added CPT Listings widget in Custom Post Types v2, it will be in next release.

    Provide FTP credentials if you want to update patch.

    Kiran

    #466330

    Anna
    Full Member
    Post count: 70
    This reply has been marked as private.
    #466372

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #466374

    Anna
    Full Member
    Post count: 70
    This reply has been marked as private.
    #466380

    Kiran
    Moderator
    Post count: 7069

    Hello Matt,

    The categories rendered via shortcode added in child theme file \themes\supreme-directory\inc\geodirectory-compatibility.php line no. 591.

    I have changed max_level=”0″ to max_level=”1″.

    The issue on your site is you have added listing to the child category, but the parent category of that child category is empty(has no listing assigned), so if parent category is empty then the child category not displayed. Parent category must have at-least one listing assigned to display child category.

    FYI: You can use shortcode [gd_cpt_listings] to display all CPTs.

    Thanks,
    Kiran

    #466387

    Anna
    Full Member
    Post count: 70

    Many thanks for your help Kiran, it’s appreciated 🙂

    #466388

    Anna
    Full Member
    Post count: 70
    This reply has been marked as private.
    #466392

    Kiran
    Moderator
    Post count: 7069

    Hello,

    You can fix it by either limiting categories count (ex: max_count=”10″ max_count_child=”10″) or by adding following style snippet.

    
    
    .featured-area .geodir-categories-container {
        overflow-x: hidden;
        max-height: 200px;
        overflow-y: auto;
    }

    Kiran

    #466395

    Anna
    Full Member
    Post count: 70

    Legend, thanks Kiran!

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

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount