Hello, I am currently using a plugin called ' improved meta description' this plugin allow us to edit the meta description of every post. the problem is that this plugin is showing only Author,Category,Post date, and tags of the post on search result of google but it is not showing description of the post, i want to know how can i make this plugin to show the description tooo ?? here is the plugin code, <?php /* Plugin Name: Improved Meta Description Snippets Plugin URI: http://www.microkid.net/wordpress-plugins/improved-meta-description-snippets/ Description: This generates a meta description for your posts automatically, in the format explained on the Google Webmaster Central blog here: http://googlewebmastercentral.blogspot.com/2007/09/improve-snippets-with-meta-description.html It uses author, post date, categories, number of comments and, when available, tags. Version: 0.1 Author: Microkid Author URI: http://www.microkid.net/ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ if ( !get_option('bas_improved_meta_descriptions_options') ) { $options = array( 'bas_improved_meta_descriptions_author' => 1, 'bas_improved_meta_descriptions_categories' => 1, 'bas_improved_meta_descriptions_postdate' => 1, 'bas_improved_meta_descriptions_numcomments' => 1, 'bas_improved_meta_descriptions_tags' => 1, 'bas_improved_meta_descriptions_divider' => '|' ); update_option( 'bas_improved_meta_descriptions_options', $options ); } function bas_improved_meta_descriptions() { if( is_single() ) { global $post; $options = get_option( 'bas_improved_meta_descriptions_options' ); $divider = $options['bas_improved_meta_descriptions_divider']; $meta_description = ''; if( $options['bas_improved_meta_descriptions_author'] == 1 ) { if( function_exists("tdomf_get_the_submitter") ) { $author = strip_tags( tdomf_get_the_submitter() ); } else { $author_data = get_userdata( $post->post_author ); if( $author_data->first_name ) { $author = $author_data->first_name . " " . $author_data->last_name; } else { $author = $author_data->nickname; } } $meta_description .= __("Author") . ": " . wptexturize( $author ); } if( $options['bas_improved_meta_descriptions_categories'] == 1 ) { if( $meta_description != '' ) $meta_description .= " $divider "; $meta_description .= __("Categories") . ": "; $category_string = ''; $categories = get_the_category(); foreach( $categories as $cat ) { $category_string .= wptexturize( $cat->cat_name ) . ', '; } $category_string = substr( $category_string, 0, strlen( $category_string ) -2 ); $meta_description .= $category_string; } if( $options['bas_improved_meta_descriptions_postdate'] == 1 ) { if( $meta_description != '' ) $meta_description .= " $divider "; $meta_description .= __("Posted") . ": " . get_post_time('j F, Y'); } if( $options['bas_improved_meta_descriptions_numcomments'] == 1 && $post->comment_count != 0 ) { if( $meta_description != '' ) $meta_description .= " $divider "; $meta_description .= __("Comments") . ": " . $post->comment_count; } if( $options['bas_improved_meta_descriptions_tags'] == 1 ) { if ( function_exists("get_the_tags") ) { // 2.3+ $wp_2_3 = true; $tags = get_the_tags( $post->ID ); } else if( function_exists("UTW_ShowTagsForCurrentPost") ) { // UTW global $utw; $tags = $utw->GetTagsForPost( $post->ID, 8 ); } if( $tags ) { if( $meta_description != '' ) $meta_description .= " $divider "; $meta_description .= __("Tags") . ": "; $tag_string = ''; if( $tags ) { $n = 0; foreach( $tags as $tag ) { if($n < 8 ) { if( $wp_2_3 ) { $tag_string .= wptexturize( $tag->name ) . ', '; } else { $tag_string .= wptexturize( $tag->tag ) . ', '; } $n++; } else { break; } } } $tag_string = substr( $tag_string, 0, strlen( $tag_string ) -2 ); $meta_description .= $tag_string; } } //echo '<!-- Meta description generated by Improved Meta Descriptions Wordpress plugin -->' . "\n"; echo '<meta name="description" content="'. $meta_description .'" />' . "\n"; } } function bas_improved_meta_descriptions_menu() { add_options_page('Impr. Meta Descr. Snippets', 'Impr. Meta Descr. Snippets', 8, basename(__FILE__), 'bas_improved_meta_descriptions_admin'); } function bas_improved_meta_descriptions_admin() { if ( isset($_POST['bas_improved_meta_description_submit'] ) ) { bas_improved_meta_descriptions_update_options(); } $options = get_option( 'bas_improved_meta_descriptions_options' ); $show_author = ( $options['bas_improved_meta_descriptions_author'] == 1 ) ? 'checked="checked"' : ''; $show_categories = ( $options['bas_improved_meta_descriptions_categories'] == 1 ) ? 'checked="checked"' : ''; $show_postdate = ( $options['bas_improved_meta_descriptions_postdate'] == 1 ) ? 'checked="checked"' : ''; $show_numcomments = ( $options['bas_improved_meta_descriptions_numcomments'] == 1 ) ? 'checked="checked"' : ''; $show_tags = ( $options['bas_improved_meta_descriptions_tags'] == 1 ) ? 'checked="checked"' : ''; $divider = $options['bas_improved_meta_descriptions_divider']; echo '<div class="wrap">'; echo '<h2>' . __('Improved Meta Descriptions Options') . '</h2>'; echo '<form method="post" action="">'; echo '<fieldset>'; echo '<h3>Show in auto generated meta description:</h3>'; echo '<p><input type="checkbox" id="bas_improved_meta_descriptions_author" name="bas_improved_meta_descriptions_author" '. $show_author.' /> <label for="bas_improved_meta_descriptions_author">'. __("Author") .'</label></p>'; echo '<p><input type="checkbox" id="bas_improved_meta_descriptions_categories" name="bas_improved_meta_descriptions_categories" '. $show_categories.' /> <label for="bas_improved_meta_descriptions_categories">'. __("Categories") .'</label></p>'; echo '<p><input type="checkbox" id="bas_improved_meta_descriptions_postdate" name="bas_improved_meta_descriptions_postdate" '. $show_postdate.' /> <label for="bas_improved_meta_descriptions_postdate">'. __("Post Date") .'</label></p>'; echo '<p><input type="checkbox" id="bas_improved_meta_descriptions_numcomments" name="bas_improved_meta_descriptions_numcomments" '. $show_numcomments.' /> <label for="bas_improved_meta_descriptions_numcomments">'. __("Number of comments") .'</label></p>'; echo '<p><input type="checkbox" id="bas_improved_meta_descriptions_tags" name="bas_improved_meta_descriptions_tags" '. $show_tags.' /> <label for="bas_improved_meta_descriptions_tags">'. __("Tags") .'</label></p>'; echo '</fieldset>'; echo '<fieldset>'; echo '<h3>Select the divider you wish to use:</h3>'; echo '<p><select id="bas_improved_meta_descriptions_divider" name="bas_improved_meta_descriptions_divider">'; echo '<option value="|"' . (( $divider == '|' ) ? ' selected="selected"' : '') . '> | (pipe)</option>'; echo '<option value=","' . (( $divider == ',' ) ? ' selected="selected"' : '') . '> , (comma)</option>'; echo '<option value="/"' . (( $divider == '/' ) ? ' selected="selected"' : '') . '> / (slash)</option>'; echo '<option value="-"' . (( $divider == '-' ) ? ' selected="selected"' : '') . '> - (hyphen)</option>'; echo '<option value=">"' . (( $divider == '>' ) ? ' selected="selected"' : '') . '> > (greather then)</option>'; echo '<option value=" "' . (( $divider == ' ' ) ? ' selected="selected"' : '') . '> (space)</option>'; echo '</select>'; echo '</p>'; echo '<p class="submit">'; echo '<input type="submit" name="bas_improved_meta_description_submit" value="Save settings" />'; echo '</fieldset>'; echo '</form>'; echo '</div>'; } function bas_improved_meta_descriptions_update_options() { $options = array(); $options['bas_improved_meta_descriptions_author'] = ( $_POST['bas_improved_meta_descriptions_author'] == "on" ) ? 1 : 0; $options['bas_improved_meta_descriptions_categories'] = ( $_POST['bas_improved_meta_descriptions_categories'] == "on" ) ? 1 : 0; $options['bas_improved_meta_descriptions_postdate'] = ( $_POST['bas_improved_meta_descriptions_postdate'] == "on" ) ? 1 : 0; $options['bas_improved_meta_descriptions_numcomments'] = ( $_POST['bas_improved_meta_descriptions_numcomments'] == "on" ) ? 1 : 0; $options['bas_improved_meta_descriptions_tags'] = ( $_POST['bas_improved_meta_descriptions_tags'] == "on" ) ? 1 : 0; $options['bas_improved_meta_descriptions_divider'] = ( $_POST['bas_improved_meta_descriptions_divider'] ); update_option('bas_improved_meta_descriptions_options', $options); echo '<div class="updated fade"><p><strong>'. __('Options saved.') .'</strong></p></div>'; } add_action('admin_menu','bas_improved_meta_descriptions_menu'); add_action('wp_head','bas_improved_meta_descriptions', 1); ?> PHP:
Why are you using a separate plugin for meta descriptions when your using the all in one seo plugin? The all in one seo plugin lets you edit posts meta descriptions as well.