Jump to content
Sign in to follow this  
lee the bean

Meta Tags Contribution - how to remove <br> chars

Recommended Posts

I've installed the Quick Meta Tags for SEO 1.0 contribution - which works a treat & I would recommend to anyone with little knowledge of PHP coding.

 

However, I would like to know if there is a simple method to remove or replace the annoying <br> (LF/CR) characters which along with the products_id text strings and the first 150 characters of the product description are used to compile the META TAGS/TITLE & DESCRIPTION.

 

I have used the <br> characters at the end of each line of text and new line to enable some simple formating within the product description.

Share this post


Link to post
Share on other sites

I've added two extra lines to remove the <br> chars from <TITLE> & <META NAME="description" CONTENT="

 

before line:

 

return ($Title);

 

add line:

 

$Title = str_replace('<br>', ' ', $Title);

 

 

and

 

before line:

return ($Description);

 

add line:

 

$Description = str_replace('<br>', ' ', $Description);

 

 

 

There, that wasn't so difficult was it. Confidence growing by the hour....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×