• Hey Guys,

    Here is a link to a sample page of my website:
    http://www.realrotas.com/rota-r-spec-replica-jdm-itr-alloy-wheels/

    As you can see with the page source Yoast is putting in two prompts for meta data which is causing google to use something else entirely.

    Id like to remove the meta prompt from the theme header.php but the code doesn’t mention meta so im unsure what to try pulling out. Here is the header.php code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
    <head>
      <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
      <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" title="no title" charset="utf-8"/>
      <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
      <?php wp_head(); ?>
    
    </head>
    <body>
    
        <?php $shortname = "font_folio"; ?>
    
        <?php if(get_option($shortname.'_custom_background_color','') != "") { ?>
        <style type="text/css">
          body { background-color: <?php echo get_option($shortname.'_custom_background_color',''); ?>; }
        </style>
        <?php } ?>
    
    <div id="main_container">
    
        <div id="header_top">
            <div class="header_top_border"></div>
            <div class="social">
                <?php if(get_option($shortname.'_facebook_link','') != "") { ?>
                  <a href="<?php echo get_option($shortname.'_facebook_link',''); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/header-social-icon1.png" /></a>
                <?php } ?>
    
                <?php if(get_option($shortname.'_twitter_link','') != "") { ?>
                  <a href="<?php echo get_option($shortname.'_twitter_link',''); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/header-social-icon2.png" /></a>
                <?php } ?>
    
                <?php if(get_option($shortname.'_dribbble_link','') != "") { ?>
                  <a href="<?php echo get_option($shortname.'_dribbble_link',''); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/header-social-icon3.png" /></a>
                <?php } ?>
    
                <?php if(get_option($shortname.'_google_plus_link','') != "") { ?>
                  <a href="<?php echo get_option($shortname.'_google_plus_link',''); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/header-social-icon4.png" /></a>
                <?php } ?>
                <div class="clear"></div>
            </div><!--//social-->
    
            <div class="search">
              <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
              <input type="text" value="Search" name="s" id="s" onclick="if(this.value == 'Search') this.value='';" onblur="if(this.value == '') this.value='Search';" />
              <INPUT TYPE="image" SRC="<?php bloginfo('stylesheet_directory'); ?>/images/search-icon.png" class="search_icon" BORDER="0" ALT="Submit Form">
              </form>
            </div>
    
            <div class="clear"></div>
        </div><!--//header_top-->
    
        <div id="header">
            <?php if(get_option($shortname.'_custom_logo_url','') != "") { ?>
              <a href="<?php bloginfo('url'); ?>"><img src="<?php echo stripslashes(stripslashes(get_option($shortname.'_custom_logo_url',''))); ?>" class="logo" /></a>
            <?php } else { ?>
              <a href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.png" class="logo" /></a>
            <?php } ?>
    
            <div id="header_menu">
            <!--
                <ul>
                  <li><a href="#">Graphic Design</a></li>
                  <li><a href="#">Photography</a></li>
                  <li><a href="#">Web Design</a></li>
                  <li><a href="#">Architecture</a></li>
                  <li><a href="#">Animations</a></li>
                  <li><a href="#">Brochures</a></li>
                  <li><a href="#">Print Design</a></li>
                  <li><a href="#">UI/UX Design</a></li>
                </ul>-->
                <?php wp_nav_menu('menu=category_menu&container=false&menu_id=menu'); ?>
                <div class="clear"></div>
            </div><!--//header_menu-->
            <div class="clear"></div>
        </div><!--//header-->
    
        <div id="content">

    The theme is Font Folio and the I have no other plugins to deactivate.

    Many thanks,
    Ben

Viewing 5 replies - 1 through 5 (of 5 total)
  • As you can see with the page source Yoast is putting in two prompts for meta data which is causing google to use something else entirely.

    Which meta data are you actually referring to? What does Google show?

    For specific questions or support for the Yoast SEO plugin, go to this page.

    Thread Starter bberry259

    (@bberry259)

    Thanks for the reply senff. The page source shows this:

    <!-- This site is optimized with the Yoast WordPress SEO plugin v1.4.25 - http://yoast.com/wordpress/seo/ -->
    <!-- Admin only notice: this page doesn't show a meta description because it doesn't have one, either write it for this page specifically or go into the SEO -> Titles menu and set up a template. -->
    <link rel="canonical" href="http://www.realrotas.com/rota-r-spec-replica-jdm-itr-alloy-wheels/" />
    <meta property="og:locale" content="en_US" />
    <meta property="og:type" content="article" />
    <meta property="og:title" content="Rota R Spec replica JDM ITR alloy wheels - Real Rotas - Wheel Comparison" />
    <meta property="og:description" content="Both the Euro and the Honda scenes love OEM wheel swaps and Honda fan boys get what they want with the Rota Spec R, a replica of JDM ITR (Japanese Domestic Market Integra Type R) alloy wheels. With more options for fitment (specifically adding 4×100) and the guarantee that the wheels aren’t bent or broken &hellip;" />
    <meta property="og:url" content="http://www.realrotas.com/rota-r-spec-replica-jdm-itr-alloy-wheels/" />
    <meta property="og:site_name" content="Real Rotas - Wheel Comparison" />
    <meta property="article:section" content="Uncategorized" />
    <meta property="article:published_time" content="2014-03-06T11:48:22+00:00" />
    <meta property="og:image" content="http://www.realrotas.com/wp-content/uploads/2014/03/rota-r-spec.jpg" />
    <meta property="og:image" content="http://www.realrotas.com/wp-content/uploads/2014/03/rota-r-spec-300x300.jpg" />
    <meta property="og:image" content="http://www.realrotas.com/wp-content/uploads/2014/03/sprint-sw98-wheels-300x200.jpg" />
    <meta property="og:image" content="http://www.realrotas.com/wp-content/uploads/2014/03/JDM-ITR-wheels-300x225.jpg" />
    <!-- / Yoast WordPress SEO plugin. -->

    Its showing it once in the head and then again in the body in the source code. I know yoast will be asking only once and it is my theme asking for it in the head (via the header.php) but im unsure what code in the header.php it is. When I do I will pull it out and all will be well in the world.

    So it is a theme and header.php code issue rather than yoast specific and im still stuck πŸ™

    what is the code at the start of index.php of your theme?

    does that problem also happen with one of the default themes, for instance with Twenty Fourteen?

    what happens if you deactivate all plugins (apart from the Yoast SEO)?

    have you contacted your theme’s developer for support?

    as you seem to be using a commercial theme, this forum here might not be able to help you; http://codex.wordpress.org/Forum_Welcome#Commercial_Products

    Thread Starter bberry259

    (@bberry259)

    Hi alchymyth,

    Here is the index.php code:

    <?php get_header(); ?>
    
            <div id="content_inside">
    
            <?php if(!is_paged()) { ?>
                <?php
                $args = array(
        //                     'category_name' => 'featured-medium',
                             'post_type' => 'post',
                             'posts_per_page' => 5
                             //'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
                             );
                query_posts($args);
                $x = 0;
                while (have_posts()) : the_post(); ?>
    
                <?php if($x == 0) { ?>
    
                <div class="big_post_box">
                    <?php if($x % 2 == 0) { ?>
                        <h3 class="gray">
                    <?php } else { ?>
                        <h3>
                    <?php } ?>
                    <a href="<?php the_permalink(); ?>"><?php echo substr(get_the_title(),0,35); ?></h3>
                    <?php if(has_post_thumbnail()) { ?>
                      <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('featured-home-big'); ?></a>
                    <?php } else { ?>
                      <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/home-big-image.png" /></a>
                    <?php } ?>
                </div><!--//big_post_box-->
    
                <?php } else { ?>
    
                <div class="post_box">
                    <?php if($x % 2 == 0) { ?>
                        <h3 class="gray">
                    <?php } else { ?>
                        <h3>
                    <?php } ?>
                    <a href="<?php the_permalink(); ?>"><?php echo substr(get_the_title(),0,35); ?></a></h3>
                    <?php if(has_post_thumbnail()) { ?>
                      <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('featured-home-small'); ?></a>
                    <?php } else { ?>
                      <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/home-small-image.png" /></a>
                    <?php } ?>
                </div><!--//big_post_box-->        
    
                <?php } ?>
    
                <?php $x++; ?>
                <?php endwhile; ?>
                <?php wp_reset_query(); ?>        
    
            <?php } ?>
    
            <?php
    if(is_paged()) {
            add_filter('post_limits', 'my_post_limit');
            global $myOffset;
            $myOffset = 5;
    }
    
            $myOffset = 5;
    
            $args = array(
    //                     'category_name' => 'featured-medium',
                         'post_type' => 'post',
                         'posts_per_page' => 8,
                         'showposts' => 8,
                         'offset' => $myOffset,
                         'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1)
                         );
            query_posts($args);
            $x = 0;
            while (have_posts()) : the_post(); ?>
    
            <div class="post_box">
                <?php if($x % 2 == 0) { ?>
                    <h3>
                <?php } else { ?>
                    <h3 class="gray">
                <?php } ?>
                <a href="<?php the_permalink(); ?>"><?php echo substr(get_the_title(),0,35); ?></a></h3>
                <?php if(has_post_thumbnail()) { ?>
                  <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('featured-home-small'); ?></a>
                <?php } else { ?>
                  <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/home-small-image.png" /></a>
                <?php } ?>
            </div><!--//big_post_box-->        
    
            <?php $x++; ?>
            <?php endwhile; ?>
    
            <div class="clear"></div>
    
            </div><!--//#content_inside-->
            <div class="clear"></div>
    
            <div class="load_more_cont">
                <div align="center"><div class="load_more_text"><?php next_posts_link('Load More') ?></div></div>
            </div><!--//load_more_cont-->
    
            <?php wp_reset_query(); ?>                
    
            <?php if(is_page()) { ?>
            <?php $wp_query = null; $wp_query = $temp;?>
            <?php remove_filter('post_limits', 'my_post_limit'); ?>
            <?php } ?>        
    
            <div class="clear"></div>
    
    <script type="text/javascript">
    // Ajax-fetching "Load more posts"
    $('.load_more_cont a').live('click', function(e) {
    	e.preventDefault();
    	//$(this).addClass('loading').text('Loading...');
            $('.load_more_text a').html('Loading...');
    	$.ajax({
    		type: "GET",
    		url: $(this).attr('href') + '#content',
    		dataType: "html",
    		success: function(out) {
    			result = $(out).find('#content_inside .post_box');
    			nextlink = $(out).find('.load_more_cont a').attr('href');
                            //alert(nextlink);
    			//$('#boxes').append(result).masonry('appended', result);
                        $('#content_inside').append(result);
    			//$('.fetch a').removeClass('loading').text('Load more posts');
                            $('.load_more_text a').html('Load More');
    
    			if (nextlink != undefined) {
    				$('.load_more_cont a').attr('href', nextlink);
    			} else {
    				$('.load_more_cont').remove();
                                    $('#content_inside').append('<div class="clear"></div>');
                                  //  $('.load_more_cont').css('visibilty','hidden');
    			}
    
                        if (nextlink != undefined) {
                            $.get(nextlink, function(data) {
                              //if($(data + ":contains('post_box')") != '') {
                              if($(data + ":contains('post_box')") == '') {
                                //alert('not found');
                                                        $('.load_more_cont').remove();
                                                        $('#content_inside').append('<div class="clear"></div>');
                              }
                            });
                        }
    
    		}
    	});
    });
    </script>
    
    <?php get_footer(); ?>

    Again nothing jumps out at me. πŸ™

    Ill test the theme swap straight after this post and report back.

    If I deactivate Yoast the source code shows one meta description as standard.

    Unfortunately as I have not paid for the premium version of the theme they do not offer support.

    I will report back in a second with what happens with twentyfourteen.

    Thread Starter bberry259

    (@bberry259)

    Ok so with twentyfourteen we have this:

    [Moderator note: Please consider using PasteBin to share large amounts of code instead]

    Which confirms that the font folio theme is throwing another meta in there. So I just need to figure out how to remove it :-/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Removing meta from header.php’ is closed to new replies.