toggle menu

How can i override SEO Ultimate plugin file with custom code if we need to change particular Meta Title for few tags or taxonomy

Manish Singh |23 Mar at 01:03

I have facing a problem with title tag rewrite due to SEO Ultimate Plugin function, if will customize function in SEO plugin then it's loss when i update plugin.

if anyone have solution for it please share with me

thanks in advance

  • 1 like
  • 1 comment

Dhananjay Kumar23 Mar at 02:03

I have a solution for you, Please use the below code above the <title> tag in header.php
$taxonomy_names = get_term_by('slug',$slug,'taxonomy name');
$term_meta = get_term_meta( $taxonomy_names->term_id );
global $titlereplacemeta;
$titlereplacemeta=$term_meta[custom field name][0];


if(!strstr($str,'global $titlereplacemeta')){
$to='$title = $this->get_title();';
$rplto='global $titlereplacemeta;if($titlereplacemeta!=""){ $title = $titlereplacemeta; }else{ $title = $this->get_title();}';
$str=str_replace($to, $rplto,$str);
file_put_contents($fpath, $str);


23 Mar at 01:03


1124 times


26 Mar at 03:03