Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Tips, Tricks & Tutorials
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 1st, 2012, 02:30 PM
arizonius arizonius is offline
 
Join Date: Dec 2010
Posts: 25
Default Shorten Meta Description

Hi,

For the product meta description tag, I'm using the following in my View <head> Elements:

<meta name="description" content="[product.description]" />

However, my meta description is then way too long. Is there a way to update the code so that the meta description is capped at, say, 200 characters?
  #2  
Old June 1st, 2012, 03:00 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

Yes, this is possible.

Change this:
HTML Code:
<meta name="description" content="[product.description]" />
To this:
HTML Code:
<meta name="description" content="<?php echo substr(strip_tags($product->description), 0, 200); ?>" />
Eric
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No meta description, or keywords macfink Problems 1 October 1st, 2011 10:34 AM


All times are GMT -5. The time now is 09:15 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.