Is it possible to have meta descriptions for Tag pages? General - All in One SEO Pack Forum

The support forums have a new home! Please visit All in One SEO Pack's new residence at Semper Plugins to purchase a support plan.

Please consider registering
guest

Log In

Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Is it possible to have meta descriptions for Tag pages?
August 24, 2010
6:54 pm
will_pigeon
New Member
Forum Posts: 5
Member Since:
August 24, 2010
Offline

I think this would be useful to enhance certain important Tags for my site.

Would it also be possible to add keywords as well to Tag Pages?

Are either of these options possible?

Or are they a bad idea?!

Thank you very much

Will

August 24, 2010
7:36 pm
shendison
New Member
Forum Posts: 8
Member Since:
February 12, 2010
Offline

I just saw this while trying to find info on how to add the meta description to tag and category pages.

Most SEO's would probably say to exclude tags and cat pages anyway from robots.txt, but in some cases the category and tag pages can be useful resources, and site owners don't want to block them.

Typically, those ARE duplicate content pages, but you might even take the time to write unique snippets. In a case like that, where you want traffic driven there, some sites might even use a unique category theme page etc. so there's no reason those pages shouldn't be indexed with a unique description tag.

So – I have a need / want to do this too on a site…

November 21, 2010
9:16 am
will_pigeon
New Member
Forum Posts: 5
Member Since:
August 24, 2010
Offline

I did this by adding some code to my header.php:

<?php if ( is_tag() && tag_description() ) : ?>
<meta name="description" content="<?php echo substr(wp_specialchars( strip_tags( tag_description()), 1 ), 0, strrpos(substr(wp_specialchars( strip_tags( tag_description()), 1 ), 0, 161 ), ' ') ); ?><?php if ( $paged < 2 ) { } else { echo (' – Page '); echo ($paged);} ?>" />
<?php endif; ?>

So it takes a defined selection from the first 160 characters of my tag description and uses it for the meta description. I use a double space to indicate where I want the meta description snippet to end. Also adds page numbers to descriptions.

November 21, 2010
1:27 pm
WordPress Professional
Admin
Forum Posts: 442
Member Since:
October 14, 2008
Offline

You must be a subscriber to view administrator posts. Click here to purchase a support subscription.

For what shall it profit a man if he shall gain the whole world and lose his own soul
Forum Timezone: America/New_York

Most Users Ever Online: 205

Currently Online:
32 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

romiojuliat: 102

yaoming987: 50

jintuy: 50

miki1986: 33

newshow: 28

karen1234: 27

Member Stats:

Guest Posters: 0

Members: 6356

Moderators: 3

Admins: 4

Forum Stats:

Groups: 5

Forums: 23

Topics: 1546

Posts: 3450

Newest Members: carofern@cisco.com, pronto, jessie, pbaylies, ninaeast, freda

Moderators: davecashmore (2), aaron (5), tempadmin (0)

Administrators: WordPress Professional (442), hallsofmontezuma (202), onefinejay (10), stevemortiboy (4)