• Resolved engeebax

    (@engeebax)


    Morning all,

    I’m in the process of setting up my first blog, and am learning as I go…

    So, what I am trying to do is to remove the link to my homepage from the title of my site. I am using the Hueman theme, but have created a child theme. The only modification I have made so far is one to change the colour of the links within my site:

    /*
     Theme Name:   Hueman Child
     Description:  Hueman Child Theme
     Author:       Neil
     Template:     hueman
     Version:      1.0.0
     Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
     Text Domain:  twenty-fourteen-child
    */
    
    @import url("../hueman/style.css");
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */
    
    <style>
    <!--
    .entry a:link {color: #1400ED; background-color: transparent; text-decoration: underline; }
    .entry a:visited {color: #C4B7F7; text-decoration: none; }
    .entry a:hover {color: #FA0000; text-decoration: underline; }
    .site-title a { display: block; color: #1400ED; max-width: 100%; }
    -->
    </style>

    Unfortunately, this has resulted in my site title at the top of each page also taking on these properties (ie, becoming blue), something that I don’t want. Is it therefore possible to either exclude the site title from the changes above, or to prevent the site title from being a link?

    In my attempt to solve this, I have also added a header.php file to my child theme, and attempted to amend the following code…

    </div>
    				<?php endif; ?>
    				<?php if ( ot_get_option('header-image') ): ?>
    					<a href="<?php echo home_url('/'); ?>" rel="home">
    						<img class="site-image" src="<?php echo ot_get_option('header-image'); ?>" alt="<?php get_bloginfo('name'); ?>">
    					</a>
    				<?php endif; ?>

    …removing the lines between 4 and 7 above, but to no effect.

    Any help here would be much appreciated!

    http://www.morecambetomelbourne.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • It looks to me like you are setting the site title color to be the blue as well in your CSS file though. If you look in the last line of that style block, you’ll see that “site-title a” is set to a color of #1400ED which is blue. Change that to whatever color you’d like and you should be good to go.

    Also, I realized you were interested in removing the link from the site header. If you want to do this ONLY to change the color, then I highly recommend against it, as having your site title be a link is expected as normal site behavior. However, if you really want to remove it, then I dug around in the Hueman theme and discovered that you actually need to be editing functions.php not your header file.

    Inside functions.php there is a section with the title “Site name/logo”. Near the end of that section there is a conditional statement that reads:

    if ( is_front_page() || is_home() ) {
    			$sitename = '<h1 class="site-title">'.$link.'</h1>'."\n";
    		} else {
    			$sitename = '<p class="site-title">'.$link.'</p>'."\n";
    		}

    You need to change the two $link variables in that code to be $logo instead. This will keep the text but not have it link to anything.

    Thread Starter engeebax

    (@engeebax)

    Hmm, simple as that huh?

    You’re a gentleman mrandyjoe, thank you very much

    Thread Starter engeebax

    (@engeebax)

    Sorry, forgot to refresh before replying….have just gone with the colour change so as not to breach netiquette….thanks again for your swift and comprehensive reply though!

    Glad to be of service!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Removing link from site title’ is closed to new replies.