Forums

Meta keyword and description tag (3 posts)

  1. Smita22
    Member
    Posted 1 year ago #

    Hi, i am new to wordpress. Can anyone tell me how could i change meta keyword and meta description tag of my wordpess site. What is procedure to change the code.

  2. mikey1
    Member
    Posted 1 year ago #

    Hi there,
    You could give this plugin a try.
    http://wordpress.org/extend/plugins/all-in-one-seo-pack/
    allows you to enter your meta keywods.
    good luck.
    mike,

  3. estjohn
    Member
    Posted 1 year ago #

    This is what I use for the keywords - I got it from another post and modified it so it works on home page too.

    The statements also make it so it does does not make xhtml errors if there are no keywords.

    <?php global $post;
    if( is_single() || is_page() || is_home() ) :
    	$tags = get_the_tags($post->ID);
    	if($tags) :
    		foreach($tags as $tag) :
    			$sep = (empty($keywords)) ? '' : ', ';
    			$keywords .= $sep . $tag->name;
    		endforeach;
    ?>
    <meta name="keywords" content="<?php echo $keywords; ?>" />
    <?php
    	endif;
    endif;
    ?>

    I am still trying to make the description be the content of the article (like first 100 words, etc)

Topic Closed

This topic has been closed to new replies.

About this Topic