Natural Web Design
SEO Tips & Tricks: They Don't Want You to Know About

Not Indexing Specific Pages

Rather than being difficult, keeping specific pages or posts from being indexed by a search engine is actually quite easy.

John H. Gohde is making the assumption that most bloggers would rarely want to keep a specific page or post from being index by search engines. Therefore, use of a plugin is really totally unnecessary. All that is required is the addition of a few lines of coding to your Header (header.php) template. And, the addition of a custom field.

 

Step 1: Modify the Header Template

First, locate the following line of php coding in your Header template.

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo(’html_type’); ?>; charset=<?php bloginfo(’charset’); ?>" />
 

Then add the following lines of coding immediately after it.

<?php
global $wp_query, $post;
$meta_words=get_post_meta($post->ID, "html_meta", true);
if($meta_words)
print ‘<meta name="robots" content="’.$meta_words.‘" />’;
?>
 

 

Step 2: Add a Custom Field

Then on each page or post that you do not want to be indexed, add a custom field called htm_meta with the value of noindex, noarchive, nosnippet, follow.

John H. Gohde asks: What could be simpler?




 

Menu

 

 

About Us
About You
Contact Us
Latest Additions






Natural Web Design