One of my WP blogs is showing the default meta description on all blog posts. I have All in one Seo installed and have looked at my other blogs but cant work out how to change the default so that I get unique description. All my posts have the same meta description and I would like to change this. Anyone got an idea
You'll need to set them individually. Everytime you make or edit a post or a page scroll down to the bottom of the page and you can override the default meta tags. Just enter a unique title and description.
try this add this code in your header.php before the wp_head attribute <?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <meta name="description" CONTENT="<?php the_excerpt_rss(); ?>" /> <?php csv_tags(); ?> <?php endwhile; endif; elseif(is_home()) : ?> <meta name="description" CONTENT="<?php bloginfo('description'); ?>" /> <?php endif; ?> Code (markup): now while writing/editing article there is a EXCERPT box at the bottom of your page , what ever you write in that will be your meta description for that page or post Note:that only posts have excerpt box but pages dont so , for that you have to add a plugin http://blog.ftwr.co.uk/wordpress/page-excerpt/ Code (markup): --------- Please Add Reputation if you like my post
Thanks have added the code, my pages are indexed with the correct description and tags will have to wait to be crawled to see if the posts change
This is the code that i already have can you check to see if it looks ok <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title> <meta name="generator" content="Wpthemess.com <?php bloginfo('version'); ?>" /> <meta name="description" content="<?php bloginfo('description'); ?>" /> <meta name="keywords" content="<?php wp_title(); ?>" />
change it to what code i have provided you , i use it on my themes , surely it will change when crawler crawls it
sorry my mistake try replacing this <meta name="description" content="<?php bloginfo('description'); ?>" /> with this <?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <meta name="description" CONTENT="<?php the_excerpt_rss(); ?>" /> <?php endwhile; endif; elseif(is_home()) : ?> <meta name="description" CONTENT="<?php bloginfo('description'); ?>" /> <?php endif; ?> Code (markup): i am sorry the <?php csv_tags(); ?> was causing problems it was code for meta keywords using your tags
Having another look at this, google is indexing the tagline from WP. I just need to change this so that G indexes the post description which I have written in the all in one seo plugin. anyone got any ideas I think this sholud be simple, Not sure i want to mess around with the code.
Just thought of something. If you've just recently tried to change the meta-tags it could be that you're still looking at an old page on Google, they don't update in real time, sometimes it takes a week or longer. Is it showing in the source code of your page?