Filtering wp title not working
-
I use some custom post type and tried to use this to create a seo friendly title. I added this in function.php of my theme but does not works. anybody please tell my what’s wrong here.
add_filter( 'wp_title', 'bd_wp_title', 10, 2 ); function bd_wp_title( $title, $sep ) { global $paged, $page; if (is_singular( 'videos' )) { $title = ''. get_the_title() .' '. strip_tags(get_the_term_list( get_the_ID(), 'video-categories', '', ' ', '' )) .' Download HD Mp4, 3GP Mobile'; } return $title; if (is_singular( 'albums' )) { $title = ''. get_the_title() .' Bangla Mp3 '. strip_tags(get_the_term_list( get_the_ID(), 'genre', '', ' ', '' )) .' Free download'; } return $title; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Filtering wp title not working’ is closed to new replies.