WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
<?php if (is_parent($page_id) == 14) { echo "<meta name=\"robots\" content=\"nofollow\" />\n";} ?>
I simply added a line of code to my template to do this. I didn't want robots following my photo gallery since that's a lot of bandwidth. My Photo Gallery page starts at page=14 so I added this to my template:Code: [Select]<?php if (is_parent($page_id) == 14) { echo "<meta name=\"robots\" content=\"nofollow\" />\n";} ?>
Could it be that the function "is_parent" not declared?What errors are shown if you set the errorlevel to E_ALL in the options?
<?php/*** simple first hack*/ if ( $page_id >= 14 ) echo "<meta name=\"robots\" content=\"nofollow\" />\n";?>
<?php/*** simple first hack*/ if ( $page_id == 34 ) echo "<meta name=\"robots\" content=\"nofollow\" />\n";?>
<?php/*** @version 0.1.2* @build 4* @date 2008-07-25* @author aldus ** @package webside-baker* @state @dev* @require WB2.7**/ $ids = Array (34, 55, 66, 723); $meta_tags = Array ( "<meta name=\"robots\" content=\"nofollow\" />\n", "<meta name=\"googlebot\" content=\"nofollow,noindex,nocache,nosnippet\" />\n");if ( true === in_array ($page_id , $ids ) ) echo implode ("", $meta_tags) ; ?>
else echo "<meta name=\"robots\" content=\"index,follow\" />\n", "<meta name=\"googlebot\" content=\"index,follow\" />\n";
<?php/*** @version 0.2.0* @build 5* @date 2008-07-26* @author aldus ** @package webside-baker* @state @dev* @require WB2.7**/ $ids = Array (34, 55, 66, 723); $meta_tags = Array ( "<meta name=\"robots\" content=\"nofollow\" />\n", "<meta name=\"googlebot\" content=\"nofollow,noindex,nocache,nosnippet\" />\n");echo ( in_array ($page_id , $ids ) ) ? implode ("", $meta_tags) : "<meta name=\"robots\" content=\"index,follow\" />\n<meta name=\"googlebot\" content=\"index,follow\" />\n";?>