Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noindex, nofollow for single page
#5
Thanks to Carlos and n00dles101 I have constructed the following solution with I18N Custom Fields Plugin to have the possibility to change the standard value for every page:

In the template:
Code:
<?php if (return_custom_field('robots') != '') { ?>
    <meta name="robots" content="<?php get_custom_field('robots'); ?>" />
<?php } else { ?>
    <meta name="robots" content="index, follow" />
<?php } ?>

I18N Custom Field setting in /data/other/customfields.xml (or set it up in Custom Fields configuration)
Code:
<item>
  <desc><![CDATA[robots]]></desc>
  <label><![CDATA[Robots Meta Tag]]></label>
  <type><![CDATA[dropdown]]></type>
  <value><![CDATA[index, follow]]></value>
  <option><![CDATA[index, follow]]></option>
  <option><![CDATA[index, nofollow]]></option>
  <option><![CDATA[noindex, follow]]></option>
  <option><![CDATA[noindex, nofollow]]></option>
</item>

You can control robots also with robots.txt in the (sub)domain root.
Advanced HTML5 & CSS3 coder. Simple JS & PHP hacker (not enough for new function coding). Build one webpage with GS (late 2012). Focusing on Theme customizing/Template files. Experience with WP.
Reply


Messages In This Thread
Noindex, nofollow for single page - by jasiek7 - 2012-02-04, 04:30:01
Noindex, nofollow for single page - by mvlcek - 2012-02-04, 04:52:46
Noindex, nofollow for single page - by Carlos - 2012-02-04, 05:14:16
Noindex, nofollow for single page - by jasiek7 - 2012-02-04, 19:32:27
Noindex, nofollow for single page - by ChriS - 2012-03-14, 20:35:16
Noindex, nofollow for single page - by ccagle8 - 2012-03-14, 23:03:32
Noindex, nofollow for single page - by mikeh - 2012-03-16, 03:28:48
Noindex, nofollow for single page - by ChriS - 2012-03-17, 08:16:04
Noindex, nofollow for single page - by mikeh - 2012-03-17, 08:52:10
Noindex, nofollow for single page - by igestalten - 2012-05-11, 19:14:56



Users browsing this thread: 1 Guest(s)