WordPress.org

Ready to get started?Download WordPress

Forums

finding code in header for meta name='robots' (2 posts)

  1. dragonsjaw
    Member
    Posted 4 years ago #

    2.8.4

    I am trying to find What part of this template file

    <?php if (strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 8")) {
    header("X-UA-Compatible: IE=7");} ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <?php
    	global $patagonia_nosidebar;
    	$options = get_option('patagonia_options');
    	if (is_home()) {
    		$home_menu = 'current_page_item';
    	} else {
    		$home_menu = 'page_item';
    	}
    	if($options['feed'] && $options['feed_url']) {
    		if (substr(strtoupper($options['feed_url']), 0, 7) == 'HTTP://') {
    			$feed = $options['feed_url'];
    		} else {
    			$feed = 'http://' . $options['feed_url'];
    		}
    	} else {
    		$feed = get_bloginfo('rss2_url');
    	}
    ?>
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <?php if( is_front_page() ) : ?>
    		<title><?php bloginfo('name'); ?> | <?php bloginfo('description');?></title>
    		<?php elseif( is_404() ) : ?>
    		<title>Page Not Found | <?php bloginfo('name'); ?></title>
        <?php elseif( is_search() ) : ?>
        <title><?php  print 'Search Results for ' . wp_specialchars($s); ?> | <?php bloginfo('name'); ?></title>
    		<?php else : ?>
    		<title><?php wp_title($sep = ''); ?> | <?php bloginfo('name');?></title>
    		<?php endif; ?>
    <meta http-equiv="imagetoolbar" content="no" />
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/clear.js"></script>
    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    <?php wp_head(); ?>
    </head>

    Is producing this line in the source:
    <meta name='robots' content='noindex,nofollow' />

    I want to change this to be 'index,follow'

    And is there somewhere within the wpfiles or the theme files where i can add my own meta tags in the header?
    I am used to hand coding all this and don't know what string above is putting the few meta tags into the source.

    any help would be greatly appreciated.

    ~bobbi

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    That code will probably be from your theme's header.php file. However, that's not what is inserting the meta robots line. Look to see what is checked in Admin/Settings/Privacy.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags