WordPress.org

Forums

Make Image Header Clickable to HOME in Minimatica (3 posts)

  1. sepegden
    Member
    Posted 1 year ago #

    HI Guys

    i've googled extensively and all the links i find are dead :(

    Please can someone tell me how to make my uploaded header image, clickable to my homepage on my wordpress minimatica themed website?

    My site is on MAMP atm so i can't give an example, but would appreciate know where to add or change code to make this happen

    I've been able to make the header clickable but then i lose my image for some reason :-/

    Thanks!

  2. sepegden
    Member
    Posted 1 year ago #

    figured it out if anyone wants to know

    replace the following text in header.php from

    <header id="header" role="banner">
    <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
    <<?php echo $heading_tag; ?> id="site-title"><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></<?php echo $heading_tag; ?>>
    </header><!-- #header —>

    to

    <header id="header" role="banner" onclick="location.href='http://www.yoursite.com';" style="cursor: pointer;" title=Home>
    <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
    <header id="header" role="banner">
    <<?php echo $heading_tag; ?> id="site-title"><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></<?php echo $heading_tag; ?>>
    </header><!-- #header -->

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code has now been permanently damaged by the forum's parser.]

  3. sepegden
    Member
    Posted 1 year ago #

    okay, for some reason that code messes with lightbox, not sure why, seems it redirects the image links to the homepage too.

    So frustrating

Topic Closed

This topic has been closed to new replies.

About this Topic