/** * Add the Robots Meta */ function zilla_metabox_seo_robots() { global $post; if ($post && !zilla_is_third_party_seo() && get_option('blog_public') == 1) { if (is_home() || is_archive() || is_search()) { $postid = get_option('page_for_posts'); } else { $postid = $post->ID; } $seo_index = get_post_meta($postid, '_zilla_seo_robots_index', true); $seo_follow = get_post_meta($postid, '_zilla_seo_robots_follow', true); if (!$seo_index) { $seo_index = 'index'; } if (!$seo_follow) { $seo_follow = 'follow'; } if (!($seo_index == 'index' && $seo_follow == 'follow')) { echo '<meta name="robots" content="' . $seo_index . ',' . $seo_follow . '" />' . "\n"; } } }
function zilla_wp_title($title, $sep) { if (!zilla_is_third_party_seo()) { $title .= get_bloginfo('name'); $site_desc = get_bloginfo('description', 'display'); if ($site_desc && (is_home() || is_front_page())) { $title = "{$title} {$sep} {$site_desc}"; } } return $title; }
/** * Creates formatted and more specific title element for output based * on current view * * @since Hanna 1.0 * * @param string $title Default title text * @param string $sep Optional separator * @return string Formatted title */ function zilla_wp_title($title, $sep) { if (!zilla_is_third_party_seo()) { global $paged, $page; if (is_feed()) { return $title; } $title .= get_bloginfo('name'); $site_description = get_bloginfo('description', 'display'); if ($site_description && (is_home() || is_front_page())) { $title = "{$title} {$sep} {$site_description}"; } if ($paged >= 2 || $page >= 2) { $title = "{$title} {$sep} " . sprintf(__('Page %s', 'zilla'), max($paged, $page)); } } return $title; }