<title> problems on every page with Wordpress SEO plugin by Yoast

Discussion in 'NomNom Theme' started by Shayes, Jan 1, 2012.

  1. Shayes New Member

    Using the Wordpress SEO plugin by Yoast, and your NomNom theme, I noticed I started having problems with the displayed Title for the webpage (what appears next to the URL in the browser). Because Yoast's plugin is one of the most downloaded wordpress plugins, and i can barely find any info on this topic on the internet, i am led to believe your theme might be the source of the problem. i absolutely love NomNom and will continue using it, but i hope you can help solve this problem for me. please go to my site and see the title problem for yourself. it seems to duplicate certain things on certain types of pages.

    http://shayessays.com/

    also see my wordpress support thread:

    http://wordpress.org/support/topic/...plicates-title-tag-on-certain-pages?replies=2
  2. Zeaks Author

    Hi Shayes. I'm not seeing the issue you mentioned, but try setting your theme to Twenty Eleven and tell me if the problem persists. I'm not familiar with using Yoast so if you've made any template changes, let me know what they were.
  3. Shayes New Member

    here is the problem. it shows up in all browsers and on my mobile phone:

    http://imgur.com/ZejCK

    the problem doesnt show up with any other themes, including twenty eleven, and doesnt show up if i deactivate Yoast's plugin. so your theme must have some sort of problem with Yoast's plugin. But i really doubt your theme is the problem, i think im just forgetting to do something. what are some things i can double check?
  4. Zeaks Author

    Hi Shayes. I'm viewing the source of yoru site, and it's showing exactly what's in the screenshot "
    Shayes Says | Film Reviews and Android BlogsShayes Says | Film Reviews and Android Blogs"

    This looks like it was maybe altered by what you've added with Yoast plugin.

    Have you made any changes to the NomNom theme files, added any php code for Yoast etc etc?
    If you have made changes, did you also make these changes to the other themes you've tried?

    I'll need to know what steps you took when installing Yoast, I know some SEO plugins may want you to add code to your header.php
  5. Shayes New Member

    just deactivated AND deleted the plugin. the problem went away. just installed the plugin again and didnt touch any settings or anything. the problem came back.

    here is the header.php file for your theme:
    PHP:
    <?php
    /**
    * The Header for our theme.
    *
    * Displays all of the <head> section and everything up till <div id="main">
    *
    * @package WordPress
    * @subpackage Twenty_Eleven
    * @since Twenty Eleven 1.0
    */
    ?><!DOCTYPE html>
    <!--[if IE 6]>
    <html id="ie6" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 7]>
    <html id="ie7" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 8]>
    <html id="ie8" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
    <html <?php language_attributes(); ?>>
    <!--<![endif]-->
    <head>
    <meta charset="<?php bloginfo'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    <title><?php
        
    /*
        * Print the <title> tag based on what is being viewed.
        */
        
    global $page$paged;
     
        
    wp_title'|'true'right' );
     
        
    // Add the blog name.
        
    bloginfo'name' );
     
        
    // Add the blog description for the home/front page.
        
    $site_description get_bloginfo'description''display' );
        if ( 
    $site_description && ( is_home() || is_front_page() ) )
            echo 
    " | $site_description";
     
        
    // Add a page number if necessary:
        
    if ( $paged >= || $page >= )
            echo 
    ' | ' sprintf__'Page %s''twentyeleven' ), max$paged$page ) );
     
        
    ?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo'stylesheet_url' ); ?>" />
    <link rel="pingback" href="<?php bloginfo'pingback_url' ); ?>" />
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
    <![endif]-->
    <?php
        
    /* We add some JavaScript to pages with the comment form
        * to support sites with threaded comments (when in use).
        */
        
    if ( is_singular() && get_option'thread_comments' ) )
            
    wp_enqueue_script'comment-reply' );
     
        
    /* Always have wp_head() just before the closing </head>
        * tag of your theme, or you will break many plugins, which
        * generally use this hook to add elements to <head> such
        * as styles, scripts, and meta tags.
        */
       
        
    if (is_home())
            
    wp_enqueue_script('slider.js');
        
    wp_head();
    ?>
     
        <script language="javascript">
            var slider_effect = '<?php echo get_option('nomnom_slider_effects'); ?>';
            var slider_speed = <?php echo get_option('nomnom_trans_speed'); ?>;
            var slider_pause = <?php echo get_option('nomnom_image_pause'); ?>;
        </script>
       
     
    </head>
     
    <body <?php body_class(); ?>>
    <div id="page" class="hfeed">
        <header id="branding" role="banner">
                <hgroup>
                    <h1 id="site-title"><span><a href="<?php echo esc_urlhome_url'/' ) ); ?>" title="<?php echo esc_attrget_bloginfo'name''display' ) ); ?>" rel="home"><?php bloginfo'name' ); ?></a></span></h1>
                    <h2 id="site-description"><?php bloginfo'description' ); ?></h2>
                </hgroup>
                <!-- Begin secondary menu #access2 -->
                <nav id="access2" role="navigation">
                    <h3 class="assistive-text"><?php _e'Secondary menu''twentyeleven' ); ?></h3>
                    <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
                    <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e'Skip to primary content''twentyeleven' ); ?>"><?php _e'Skip to primary content''twentyeleven' ); ?></a></div>
                    <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e'Skip to secondary content''twentyeleven' ); ?>"><?php _e'Skip to secondary content''twentyeleven' ); ?></a></div>
                <?php // This is where the menu is added
                    
    wp_nav_menu( array('container_class' => 'menu-top',
                    
    'theme_location' => 'secondary''fallback_cb' => '') ); ?>               
                </nav><!-- end of #access2 -->
                <?php
                    
    // Check to see if the header image has been removed
                    
    $header_image get_header_image();
                    if ( ! empty( 
    $header_image ) ) :
                
    ?>
                    <div id="nomnom-header">
     
                    <?php
                        
    // The header image
                        // Check if this is a post or page, if it has a thumbnail, and if it's a big one
                        
    if ( is_singular() &&
                                
    has_post_thumbnail$post->ID ) &&
                                ( 
    /* $src, $width, $height */ $image wp_get_attachment_image_srcget_post_thumbnail_id$post->ID ), array( HEADER_IMAGE_WIDTHHEADER_IMAGE_WIDTH ) ) ) &&
                                
    $image[10] >= HEADER_IMAGE_WIDTH ) :
                            
    // Change the above number 10 to 0 if you want featured image displayed in the header when viewing posts
                            
    echo get_the_post_thumbnail$post->ID'post-thumbnail' );
                        elseif (
    is_home() && get_option("nomnom_has_slider")) :                       
                            if (!
    nomnom_slider ()): ?>
                                <a href="<?php echo esc_urlhome_url'/' ) ); ?>">
                                    <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH?>" height="<?php echo HEADER_IMAGE_HEIGHT?>" alt="" />
                                </a>
                            <?php endif;
                        else : 
    ?>
                        <a href="<?php echo esc_urlhome_url'/' ) ); ?>">
                            <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH?>" height="<?php echo HEADER_IMAGE_HEIGHT?>" alt="" />
                        </a>
                    <?php endif; // end check for featured image or standard header ?>
                    </div>
     
                <?php endif; // end check for removed header image ?>
       
                <?php
                    
    // Has the text been hidden?
                    
    if ( 'blank' == get_header_textcolor() ) :
                
    ?>       
                    <div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
                <?php if (get_option'nomnom_display_search' )): ?><!-- search no text on/off switch -->
                    <?php get_search_form(); ?>
                <?php endif; ?><!-- end search no text on/off -->
                    </div>
                <?php
                    
    else :
                
    ?>
                <?php if (get_option'nomnom_display_search' )): ?><!-- search  with text on/off switch -->
                    <?php get_search_form(); ?>
                <?php endif; ?>
                <?php endif; ?><!-- end search with text on/off -->
                <nav id="access" role="navigation">
                    <h3 class="assistive-text"><?php _e'Main menu''twentyeleven' ); ?></h3>
                    <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
                    <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e'Skip to primary content''twentyeleven' ); ?>"><?php _e'Skip to primary content''twentyeleven' ); ?></a></div>
                    <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e'Skip to secondary content''twentyeleven' ); ?>"><?php _e'Skip to secondary content''twentyeleven' ); ?></a></div>
                    <?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
                    <?php if (get_option'nomnom_default_menu' )) wp_nav_menu( array( 'theme_location' => 'primary') ); ?>
                </nav><!-- #access -->
        </header><!-- #branding -->
        <div id="main">
  6. Shayes New Member

    oh actually, wait a minute

    i just deactivated NomNom and activated Twenty Eleven, and the problem is still there. that totally didnt happen last time i tried this. im sorry

    im gonna post this to Yoast's site
  7. Shayes New Member

    also i was wondering if you could widen the columns a little bit. im using the 3 column setting in NomNom and i feel like the central column is too thin to be the main content for the site. any way you could make widening the central column a setting in the Theme Options so we could manually widen the columns ourselves. or at the very least if you could show me how to edit the code to do it myself, that would be awesome too. thanks
  8. Shayes New Member

    any updates?
  9. Zeaks Author

    All sections of the style.css are commented and classes should be easily recognized. Take a look at them and play around with the margins until you get what you want. If you're still having trouble, link me what you have and I'll take a look.

    Here is a post on changing the sidebar width, it's for a 2 column layout, but the same idea works. http://zeaks.org/twenty-eleven-change-sidebar-width/
  10. Shayes New Member

    thanks, i think i got it through trial and error

    btw, someone told me to edit the header.php file with this, and it worked. the problem is gone, and Yoast's plugin is controlling my title tags. thanks for your help!

    PHP:
    <title><?php wp_title(''); ?></title>

Share This Page