• Resolved samuelng527

    (@samuelng527)


    Hi,

    May I know how can I display all the categories on the directory page instead of having displaying 1 then “+2”?

    Please advise. many thanks.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Rafiz Sejim

    (@rafizsejim)

    Greetings,

    Thank you for reaching us.

    I am sorry, by default you are unable to show all the categories on the listings card.

    However, you can add the following snippet to your theme’s functions.php to display all the categories.

    function directorist_categ_show() {
    wp_enqueue_script( 'jquery' );
    ?>	
    <script>
    	jQuery(document).ready(function($){
    		$('.directorist-listing-single__meta--left .directorist-listing-category').each(function(){
    			 $('.directorist-listing-category__popup div').removeClass('directorist-listing-category__popup__content').addClass('categ-show');
    			 $('.directorist-listing-category__extran-count').css('display', 'none');
    		}) 
    	})
    		
    </script>
    
    <?php
    }
    
    add_action( 'wp_footer', 'directorist_categ_show');

    You will also need additional CSS to tweak the style.

    Regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Display All Categories’ is closed to new replies.