Post Formats not showing up on Category Archive Page (2 posts)

  1. Meadhbh
    Posted 1 year ago #

    I've been rebuilding my website, and have noticed that any post formats other than standard don't show up on the category pages, but if I change them back to standard they do.

    Is there any way I can make non-standard post types (asides, links, statuses, etc.) show up on category pages as well as the main blog?

  2. tomaja
    Posted 1 year ago #

    you can try by adding this function into child`s theme functions.php file

    add_filter( 'pre_get_posts', 'non_standard_types' );
    function non_standard_types( $query ) {
    	if ( is_home() && $query->is_main_query() )
    		$query->set( 'post_type', array( 'type1', 'type2', 'type3' ) );
    	return $query;

    where you need to replace type1, type2,... with your actual custom post types. Also, if you want them in archive you can add or replace is_home() with is_archive()

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic