Change default Meta Description tag on all pages

Discussion in 'WordPress' started by sarkin ruwa, Dec 8, 2009.

  1. #1
    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
     
    sarkin ruwa, Dec 8, 2009 IP
  2. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #2
    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.
     
    bob25, Dec 8, 2009 IP
  3. sarkin ruwa

    sarkin ruwa Peon

    Messages:
    483
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks I do this but the defaut keeps kicking in
     
    sarkin ruwa, Dec 8, 2009 IP
  4. Wp-Mod.Com

    Wp-Mod.Com Peon

    Messages:
    381
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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
     
    Wp-Mod.Com, Dec 9, 2009 IP
  5. sarkin ruwa

    sarkin ruwa Peon

    Messages:
    483
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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
     
    sarkin ruwa, Dec 9, 2009 IP
  6. sarkin ruwa

    sarkin ruwa Peon

    Messages:
    483
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    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() ) { ?> &raquo; 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(); ?>" />
     
    sarkin ruwa, Dec 9, 2009 IP
  7. Wp-Mod.Com

    Wp-Mod.Com Peon

    Messages:
    381
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #7
    change it to what code i have provided you , i use it on my themes , surely it will change when crawler crawls it
     
    Wp-Mod.Com, Dec 9, 2009 IP
  8. sarkin ruwa

    sarkin ruwa Peon

    Messages:
    483
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    When i added the code my site went flat so i took it our and its back
     
    sarkin ruwa, Dec 9, 2009 IP
  9. Wp-Mod.Com

    Wp-Mod.Com Peon

    Messages:
    381
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #9
    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
     
    Wp-Mod.Com, Dec 9, 2009 IP
  10. sarkin ruwa

    sarkin ruwa Peon

    Messages:
    483
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Ok thanks will have another go
     
    sarkin ruwa, Dec 10, 2009 IP
  11. sarkin ruwa

    sarkin ruwa Peon

    Messages:
    483
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #11
    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.
     
    sarkin ruwa, Dec 11, 2009 IP
  12. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #12
    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?
     
    bob25, Dec 11, 2009 IP
  13. sarkin ruwa

    sarkin ruwa Peon

    Messages:
    483
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Soucre code is showing the default from the WP tagline
     
    sarkin ruwa, Dec 14, 2009 IP