Custom Meta Title for Custom Post Type
The template tag to check CPTs single page – is_singular. So you can use is_singular(‘songs’) to check if the current post page is a single page for post type songs.
The template tag to check CPTs single page – is_singular. So you can use is_singular(‘songs’) to check if the current post page is a single page for post type songs.
Hierarchical permalinks for custom post type and taxonomy
How do I programmatically create new posts of a custom post type over the XML-RPC API?
Multiple Frontend Filters Using Advanced Custom Fields
Exclude custom taxonomy term posts from custom post loop
I guess that you should change the order to first check if there is any parent: <?php if ( is_home() || is_page( ‘overview’ ) || is_page( ‘about’ ) ) : ?> Home Page <?php elseif ( $post->post_parent > 0 ): ?> artist child <?php elseif ( ‘artists’ == get_post_type() ): ?> artist parent <?php else … Read more
Is it better to use filter for the_content in archive pages?
How do I share categories across multiple post types?
You may not completely get out without using a template file. I might be wrong!!. But, by using get_template_part in your single-product.php you will be able to use page-three-column.php file. So in your single-product.php something like this should do. <?php get_template_part( ‘page-three-column.php’ ); ?> You may refer to the Codex here.
You should be able to use what you have and just wrap it with: <?php if ( is_year( ) ) { ?> **Your Code** <?php } ?> And changing ‘hide_empty’ => false to ‘hide_empty’ => 1 should prevent the cats with no posts from showing.