Support » Plugin: Advanced Sidebar Menu » Is there a way to display post count per category?

  • Resolved kunstpause

    (@kunstpause)


    Is it possible to show the amount of posts that every category and every child category has as a number in the menu?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mat Lipe

    (@mat-lipe)

    Hi Kunstpause,

    Yes. This is possible by adding this filter to your active theme’s functions.php file

    function asm_show_count( $args ) {
    	$args['show_count'] = true;
    
    	return $args;
    }
    
    add_filter( 'advanced-sidebar-menu/menus/category/get-list-categories-args', 'asm_show_count' );

    Enjoy!

    Mat Lipe

    Thank you so much, worked perfectly for what I wanted.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is there a way to display post count per category?’ is closed to new replies.