• ResolvedModerator t-p

    (@t-p)


    I use the following filter to display Category below the posts on single:

    add_filter( 'twentytwenty_post_meta_location_single_bottom', function( $arr ) {
    	if ( is_singular() ) {
    		$arr[] = 'categories';
    		return $arr;
    	}	
    	return array();
    } );

    Issue: It ONLY display the Main or Parent category. It does not display the subcategories.

    Question: Can this filter be modified to include subcategories in it? Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, do you have the subcategories selected? It works on my end. Also, that filter does not have a subcategories option, it will call the_category() which is the default way of doing it and should display all types of categories.

    Moderator t-p

    (@t-p)

    Yes. I got it. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Include subcategories with the parent category’ is closed to new replies.