You are here:  » Remove Merchant, Category or Brand from H1

Active Forum Topics


Remove Merchant, Category or Brand from H1

Submitted by Retro135 on Thu, 2016-12-01 13:32 in

I have this installed from here: http://www.pricetapestry.com/node/5699

I want only h1 to not have Merchant, Category or Brand. I can change the code to, but how do I make it work for only h1?:
str_replace(array(":","merchant","category","brand"),array("","","",""),$q);

Submitted by support on Thu, 2016-12-01 15:32

Hi,

Rather than change $q, instead where you are outputting your h1 tag using, for example;

<h1><?php print htmlspecialchars($q,ENT_QUOTES,$config_charset); ?></h1>

...make the replacement directly at this point; for example;

<h1><?php print htmlspecialchars(str_replace(array(":","merchant","category","brand"),"",$q),ENT_QUOTES,$config_charset); ?></h1>

(note where all replacements are the same, second parameter in call to str_replace does not need to be an array...)

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Retro135 on Thu, 2016-12-01 20:13

Works fab!