Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Custom Component Help

@shanebp

Moderator

Might be related to your component, but probably just the usual cpt issues.

Do you have a theme template called single-music.php so that WP can display it?

Do you have a pre_get_posts filter in your theme/functions.php or plugin file so that WP knows you want a cpt?

// so music cpt is included in cat or tag calls
function stoi_query_post_type($query) {
  if(is_category() || is_tag()) {
    $post_type = get_query_var('post_type');
	if($post_type)
	    $post_type = $post_type;
	else
	    $post_type = array('post','music');
    $query->set('post_type',$post_type);
	return $query;
    }
}
add_filter('pre_get_posts', 'stoi_query_post_type');
Skip to toolbar