WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Image Header Link With Dark Maple (8 posts)

  1. VoLiTioN
    Member
    Posted 9 years ago #

    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

  2. skulled
    Member
    Posted 9 years ago #

    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.

  3. VoLiTioN
    Member
    Posted 9 years ago #

    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?

  4. skulled
    Member
    Posted 9 years ago #

    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-->

  5. VoLiTioN
    Member
    Posted 9 years ago #

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

  6. skulled
    Member
    Posted 9 years ago #

    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-->

  7. VoLiTioN
    Member
    Posted 9 years ago #

    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. :)

  8. skulled
    Member
    Posted 9 years ago #

    Glad to be of help :)

Topic Closed

This topic has been closed to new replies.

About this Topic