You are here:  » brand: - need to remove it


brand: - need to remove it

Submitted by getgood on Sat, 2006-05-20 10:45 in

Hi Dave,

There is a post on this already but i've added the code and can't seem to remove this.

I need to remove the - brand: Bionik: Putter Reviews - so it says - Bionik Putter Reviews

http://whichputter.com/brand/Bionik/

I have added this code:

$header["title"] = $q;
$header["title"] = str_replace("merchant:","",$header["title"]);
$header["title"] = str_replace("category:","",$header["title"]);
$header["title"] = str_replace("brand:","",$header["title"]);
$header["title"] = str_replace(":"," ",$header["title"]);

I'm calling my own title tag through

<?php
 
print "$q
?>

I have moved this code to the top of the page incase it had to process this before making changes to my title tag but it doesn't seem to be working?

Any ideas on how I could do this would be appreciated.

Thanks

Adam

Submitted by support on Sun, 2006-05-21 07:12

Hi Adam,

After making the changes you will have to refer to the $header["title"] variable instead of the original $q as it will still contain the original query complete with brand and : etc. Following the code above, anywhere you use the following should print what you want:

<?php
 
print $header["title"];
?>

I would make the modification at the top of includes/header.php, so overall you would have:

<?php
  $header
["title"] = str_replace("merchant:","",$header["title"]);
  
$header["title"] = str_replace("category:","",$header["title"]);
  
$header["title"] = str_replace("brand:","",$header["title"]);
  
$header["title"] = str_replace(":"," ",$header["title"]);
  if (
file_exists("html/user_header_before.php")) require("html/user_header_before.php");
  .. 
rest of code ..
?>

Submitted by getgood on Sun, 2006-05-21 22:46

Works great thanks.