Featured Area below search bar
This topic contains 14 replies, has 3 voices, and was last updated by Anna 6 years, 11 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
January 23, 2019 at 5:10 am #464848
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
MattJanuary 23, 2019 at 6:10 am #464854Hi 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!
January 23, 2019 at 8:02 am #464873This reply has been marked as private.January 23, 2019 at 8:31 am #464882This reply has been marked as private.January 24, 2019 at 8:39 am #465155Hello 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
January 30, 2019 at 1:41 am #466134This reply has been marked as private.January 30, 2019 at 1:47 pm #466193Hello 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
January 31, 2019 at 1:34 am #466330This reply has been marked as private.January 31, 2019 at 9:03 am #466372This reply has been marked as private.January 31, 2019 at 9:20 am #466374This reply has been marked as private.January 31, 2019 at 10:27 am #466380Hello 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,
KiranJanuary 31, 2019 at 10:46 am #466387Many thanks for your help Kiran, it’s appreciated 🙂
January 31, 2019 at 10:51 am #466388This reply has been marked as private.January 31, 2019 at 11:11 am #466392Hello,
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
January 31, 2019 at 11:26 am #466395Legend, thanks Kiran!
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket