WordPress.org

Support

Support » Themes and Templates » [Resolved] Image Header Link With Dark Maple

[Resolved] Image Header Link With Dark Maple

  • Moshu, I came across the Dark Maple theme, and I wanna say from the start that it’s fantastic.

    But, there’s one thing I want to do. I’d like to make the header image as a clickable link to the main page on my site. And get rid of the blog title text. I’ve searched and found solutions for the Kubrick theme, but I really don’t want to mess anything up… What can I do?

    Blog’s located here: http://www.redshiftradio.com

Viewing 7 replies - 1 through 7 (of 7 total)
  • Open your header.php file inside the theme directory.

    You will see something like this:


    <div id="masthead"> <!--div masthead starts-->
    <h1 id="header"><a href="<?php ... ?>"><?php ... ?></a></h1>
    <div class="slogan"></div>
    </div> <!--div masthead ends-->

    You should be able to safely change it to this and that should solve the problem:


    <div id="masthead"> <!--div masthead starts-->
    <!--<h1 id="header"><a href="<?php ... ?>"><?php ... ?></a></h1>-->
    <div class="slogan"></div>
    </div> <!--div masthead ends-->

    You are just basically commenting out the <h1> part.

    Are you sure it’s header.php? because I see nothing like that inside the file.

    Again, the theme I’m using is Dark Maple. Are you sure you’re not confusing that code for another theme?

    Sorry my bad ..

    Its your index.php file.

    And here’s the exact code from it:

    <div id="masthead"> <!--div masthead starts-->
    <h1 id="header"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
    <div class="slogan"><?php bloginfo('description'); ?></div>
    </div> <!--div masthead ends-->

    Change it to:

    <div id="masthead"> <!--div masthead starts-->
    <!--<h1 id="header"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>-->
    <div class="slogan"><?php bloginfo('description'); ?></div>
    </div> <!--div masthead ends-->

    Well, that code got rid of the text, but I still want to make the header image a link to the main page. 🙁

    Try adding this to the code.

    Change this:

    <div id="masthead"> <!--div masthead starts-->

    to:

    <div id="masthead" onclick="location.href='www.redshiftradio.com';" style="cursor: pointer;"> <!--div masthead starts-->

    Awesome! I copy and pasted the code into the single.php, searchpage.php and archives.php and it seems to work just fine.

    Thank you very much. 🙂

    Glad to be of help 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Image Header Link With Dark Maple’ is closed to new replies.
Skip to toolbar