Create a Dynamic META Description function For Wordpress

December 2, 2008

If you examine Google’s search result page, you’ll notice that the description (the text under the linked title) displays the page’s META description if present. Therefore, putting a different META description in each of your website’s pages is important if you want to attract clicks in search result pages where your site ranks. If your description complements the title well, you can attract more clicks. This blog uses this technique so if you go to any of my pages here, you’ll notice I have... [Read the full story]

Add meta description to your wordpress theme

October 27, 2008

Open your header.php file. Paste the following code anywhere within the <head> and </head> tags: <?php if ( (is_home()) || (is_front_page()) ) { ?> <meta name="description" content="Blog description goes here" /> <?php } elseif (is_single()) { ?> <meta name="description" content="<?php the_excerpt();?>"/> <?php } ?> Good job! Your theme now have meta description on the homepage as well as single posts. Also, we should create another conditionnal structure to handle categories.  Read More →

Page 1 of 11