AISEO and ‘document_title_parts’
-
Hi! In the file functions.php to change the TITLE of certain pages, there is a code:
add_filter( 'document_title_parts', function($title) { if(!preg_match('#/filter.*#', $_SERVER['REQUEST_URI'])) return $title; global $meta_post_url; if($meta_post_url) { $title['title'] = $meta_post_url->post_title; unset( $title['site'] ); return $title; } $myTitle = explode('||', Filter::get_this_names()); $title['title'] = 'View '.$myTitle[0]; unset( $title['site'] ); return $title; });
However, it stopped working after updating the plugin. And it works when the plugin is disabled.
What happened? How to repair this?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘AISEO and ‘document_title_parts’’ is closed to new replies.