Category Icons Ajax CPT in Supreme Theme Home Page

This topic contains 5 replies, has 3 voices, and was last updated by  Naveen Giri 4 years, 11 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #519858

    Dale
    Full Member
    Post count: 96

    Good day,

    I am trying to create a Home Page as in Supreme Directory using Genesis Sample Theme.

    The Supreme Theme Home Page has the Search functionality and displaying a “Popular Post Category” below which automagically changes depending on the CPT selected.

    The “Popular Post Category” is added via shortcode according to support topic > https://wpgeodirectory.com/support/topic/category-icons-supreme-theme-home-page/

    I am for the life of me not able to reproduce this functionality.

    I found the shortcode that possibly creates this functionality in another support topic as > [gd_search][gd_categories title_tag=”hide” post_type=”0″ cpt_ajax=”1″ hide_count=”1″ sort_by=”count” max_level=”0″ max_count=”6″ hide_empty=”1″]

    This however does not work as the search and category shortcodes are separate.

    This is ideal for any directory with multiple Custom Post Types.

    How can we utilise this in custom Themes?

    #519900

    Alex Rollin
    Moderator
    Post count: 27815

    That would require a customization outside of support because it is using more of the functionality (and code) from the Supreme theme, more than just the shortcode.

    #519911

    Dale
    Full Member
    Post count: 96

    Hi Alex,

    Thanks for your reply. I was hoping this would be something the DEV team could make available to all as it is inherent functionality to GeoDirectory V2 and not V1.

    I am busy upgrading a 10 site multisite (Genesis Framework) to V2 and not being able to use this functionality makes me feel like I am missing out on a huge upgraded feature.

    Can you perhaps steer me to the correct file/location where this function is written to see if I can reverse engineer for Genesis.

    #520246

    Naveen Giri
    Moderator
    Post count: 1559

    Hi dale,

    use below code snippet to make those shortcode work like supreme-directory theme.

    
    
    
    add_action( 'wp_head', function () { ?>
    	<script>
        jQuery(document).ready(function(){
    		jQuery("body").on("geodir_setup_search_form", function(){
    			if (jQuery(".geodir-cat-list-tax").length) {
    				var postType = jQuery('.search_by_post').val();
    				jQuery(".geodir-cat-list-tax").val(postType);
    				jQuery(".geodir-cat-list-tax").change();
    			}
    		});
    	});
    	</script>
    <?php } );
    

    Thanks

    #520283

    Dale
    Full Member
    Post count: 96

    Hi Naveen,

    Thank you ever so much. This works a charm; – a bit of CSS styling and it looks and works beautifully.

    You may close this support request.

    #520296

    Naveen Giri
    Moderator
    Post count: 1559

    Thanks for your confirmation.

Viewing 6 posts - 1 through 6 (of 6 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