Try editing your theme’s header.php template file.
Thread Starter
Ewan24
(@ewan24)
ah ok ….thanks
im not too sure what Im looking for as there are a few bits which say description.. do you reckon you could point me in the right direction?
here is my header.php (the top part which begins and end with </head>)
<head profile="http://gmpg.org/xfn/11">
<!-- page titles -->
<title>
<?php if ( is_home() ) { ?><?php bloginfo('name'); ?> | <?php bloginfo('description'); ?><?php } ?>
<?php if ( is_search() ) { ?><?php bloginfo('name'); ?> | Search Results<?php } ?>
<?php if ( is_author() ) { ?><?php bloginfo('name'); ?> | Author Archives<?php } ?>
<?php if ( is_single() ) { ?><?php wp_title(''); ?> | <?php bloginfo('name'); ?><?php } ?>
<?php if ( is_page() ) { ?><?php bloginfo('name'); ?> | <?php wp_title(''); ?><?php } ?>
<?php if ( is_category() ) { ?><?php bloginfo('name'); ?> | Archive | <?php single_cat_title(); ?><?php } ?>
<?php if ( is_month() ) { ?><?php bloginfo('name'); ?> | Archive | <?php the_time('F'); ?><?php } ?>
<?php if (function_exists('is_tag')) { if ( is_tag() ) { ?><?php bloginfo('name'); ?> | Tag Archive | <?php single_tag_title("", true); } } ?>
</title>
<!-- meta tags -->
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<?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; ?>
<!-- import required theme styles -->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<!-- rss, pingback url and favicon link -->
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="shortcut icon" href="<?php echo get_option('home'); ?>/favicon.ico" type="image/x-icon" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
</head>
it is this line:
<meta name="description" content="<?php the_excerpt_rss(); ?>" />
it is embedded conditionally on ‘single’ or ‘page’ pages.
actually, if you want to leave the meta ‘description’ tag to your seo plugin, you could consider taking this whole code out:
<?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; ?>
Thread Starter
Ewan24
(@ewan24)
cheers
that has worked… now there is only one description per page and its the description from the all in one SEO
Just out of interest …is there any problems with removing this bit of code ?
thanks so much alchymyth 🙂
Ewan
if you get your meta description from another source, such as your seo plugin, there is absolutely no problem in removing the code.
Thread Starter
Ewan24
(@ewan24)
ah ok…thats good to know
Thanks esmi and alchymyth you have been a great help 🙂