hi some of my post titles look like this:
<b>Da dana dan</b> songs – Paisa Song from <b>Da Dana Dan</b> – Vox
when i add this code to the functions file nothing happens:
function the_title_trim($title) {
// Might aswell make use of this function to escape attributes
$title = attribute_escape($title);
// What to find in the title
$findthese = array(
‘#<b>#’,
‘#</b>#’
);
// What to replace it with
$replacewith = array(
‘test’,
‘test2’
);
// Items replace by array key
$title = preg_replace($findthese, $replacewith, $title);
return $title;
}
any ideas? thanks
this is funny i went to edit this post and noticed that my <b> symbol had been replaced with “& lt;b& gt;”
when i put put the same code in place of <b> in the function.php filter it works fine.
i can finally get rid of unwanted characters appearing in my post titles.
thanks