Custom Meta Title for Custom Post Type

I have several custom post types that need to display different values within <title></title> in the header.

I understand for the home page, posts, categories, and pages you can use..

Read More
if (is_home()){ }
elseif (is_category()){}    
elseif (is_single() ) {}
elseif (is_page() ) {}

My question is, how would I do the same for individual CPTs (eg. songs, videos, news..etc)

Related posts

1 comment

  1. 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.

Comments are closed.