Trouble removing the Prefix from taxonomy title
-
I’m trying to remove the prefix from an archive page title but the methods of normally doing this within WordPress are not working. For instance:
/** * * Remove "Topic: " from CPT "topic" archive page titles **/ function clean_tax_page_title($title) { if (is_tax('topics')) { $title = single_cat_title('',false); }elseif ( is_post_type_archive('topics') ) { $title = post_type_archive_title( '', false ); } return $title; } add_filter('get_the_archive_title', 'clean_tax_page_title'); add_filter( 'get_the_archive_title_prefix', '__return_false' );
I would expect that code to remove “Topic: ” from the archive page
<h1>
, however, it does not.Does Elementor not use the_archive_title() ? Or could it be a priority issue?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Trouble removing the Prefix from taxonomy title’ is closed to new replies.