Posted By

scottnix on 10/04/11


Tagged

php head thematic


Versions (?)

Clean Thematic Meta Index


 / Published in: PHP
 

URL: http://scottnix.com/2011/polishing-thematics-head/

Clean the Meta tag index, follow from the Thematic Framework, this is also a helpful template if you wanted to display categories with a index/follow if you do a e-com store with Thematic.

  1. // remove the index and follow tags from main pages.
  2. function childtheme_create_robots($content) {
  3. if (thematic_seo()) {
  4. if((is_home() && ($paged < 2 )) || is_front_page() || is_single() || is_page() || is_attachment()) {
  5. $content = "";
  6. } elseif (is_search()) {
  7. $content = "\t";
  8. $content .= "<meta name=\"robots\" content=\"noindex,nofollow\" />";
  9. $content .= "\n\n";
  10. } else {
  11. $content = "\t";
  12. $content .= "<meta name=\"robots\" content=\"noindex,follow\" />";
  13. $content .= "\n\n";
  14. }
  15. return $content;
  16. }
  17. }
  18. add_filter('thematic_create_robots', 'childtheme_create_robots');

Report this snippet  

You need to login to post a comment.