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.

 
You must be logged in to post
Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Is it possible to have meta descriptions for Tag pages?

Post
New Member

will_pigeon

United Kingdom

posts 5

6:54 pm August 24, 2010

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

New Member

shendison

Portland Oregon

posts 8

7:36 pm August 24, 2010

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…

New Member

will_pigeon

United Kingdom

posts 5

9:16 am November 21, 2010

Post edited 9:17 am – November 21, 2010 by will_pigeon


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.

Admin

WordPress Professional

Raleigh, NC

posts 442

1:27 pm November 21, 2010

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


About the WordPress Developer Forum

Forum Timezone: America/New_York

Most Users Ever Online: 205

Currently Online:
20 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 5
Forums: 23
Topics: 1543
Posts: 3447

Membership:

There are 6357 Members

There are 4 Admins
There are 3 Moderators