• Hi guys,

    Would sincerely appreciate any advice as I am a complete novice to php.

    my website is https://www.eatandtravelwithus.com/

    When I load the text-only Google Cache view of my site, the below lines appear at the top of my page.

    Eat and Travel With Us
    Singapore Food and Travel Blog
    Skip to content

    Home
    About
    Archives

    ← The Ultimate Seoul Travel Guide!

    I wanted to remove the parts in bold, so I edited two php files in my twenty ten child theme: the header.php and loop-single.php

    1. Header.php (I removed the quoted parts)

    <<?php echo $heading_tag; ?> id=”site-title”>
    <span>

    ” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?>

    </span>
    </<?php echo $heading_tag; ?>>

    <div id=”site-description”><?php bloginfo( ‘description’ ); ?></div>

    <a href="<?php echo home_url('/'); ?>"

    title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>”

    rel=”home”>

    <div id=”access” role=”navigation”>

    <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
    <div class=”skip-link screen-reader-text”>“><?php _e( ‘Skip to content’, ‘twentyten’ ); ?></div>

    2. loop-single.php
    Removed the below two chunks:

    <div id=”nav-above” class=”navigation”>
    <div class=”nav-previous”><?php previous_post_link( ‘%link’, ‘<span class=”meta-nav”>’ . _x( ‘←’, ‘Previous post link’, ‘twentyten’ ) . ‘</span> %title’ ); ?></div>
    <div class=”nav-next”><?php next_post_link( ‘%link’, ‘%title <span class=”meta-nav”>’ . _x( ‘→’, ‘Next post link’, ‘twentyten’ ) . ‘</span>’ ); ?></div>
    </div><!– #nav-above –>

    ———————————————————–

    <div id=”nav-below” class=”navigation”>
    <div class=”nav-previous”><?php previous_post_link( ‘%link’, ‘<span class=”meta-nav”>’ . _x( ‘←’, ‘Previous post link’, ‘twentyten’ ) . ‘</span> %title’ ); ?></div>
    <div class=”nav-next”><?php next_post_link( ‘%link’, ‘%title <span class=”meta-nav”>’ . _x( ‘→’, ‘Next post link’, ‘twentyten’ ) . ‘</span>’ ); ?></div>
    </div><!– #nav-below –>`

    ———————————————————–

    1. Will my amendment to the php files affect my site’s performance in any way? In terms of site speed, robot crawl, etc.

    2. Are the amendments correct for what I want to do? The google cache view of my site is still not updated yet so I am unable to tell.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Is there any particular reason you don’t want these at the top of the Google Cache view (which I’m assuming just doesn’t have any CSS)?

    Removing the code you removed won’t affect performance, but removing the “Skip to Content” link is very bad for accessibility.

    Thread Starter Evanstang

    (@evanstang)

    Thanks very much for your prompt reply Jacob.

    I want to remove these parts because I do not want the crawling bot to read these words first. Instead, I want the bot to read my article’s title first (which contains keywords) so as to improve SEO.

    Why is removing the “Skip to Content” link bad for accessibility? I do not see this link when I view the page in normal mode. I only see it in the text-only cache view.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Advice on Header.php in twenty ten theme’ is closed to new replies.