Ready to get started?Download WordPress


WPFolio - Make image banner link back to homepage (2 posts)

  1. viv85e
    Posted 3 years ago #

    I'm running WPFolio on a local server and making some tweaks to the template.
    My main roadblock is making the banner image link back to the homepage.

    I found a few codes for the header.php file in the forum but only this one gave me partial results:
    <div class="header" onclick="location.href='http://mysite.com/';" style="cursor: pointer;">

    The problem is that it only works if inserted *after* "container". If I put it after "header" it does not work. Here is a look at the header.php code:

    <!-- calling wp_head -->
    <?php wp_head(); ?> <!-- done calling wp_head -->
    <body <?php body_class(); ?>>
    <div class="container"> <div class="header" onclick="location.href='http://vivianesparza.com/';" style="cursor: pointer;">
    	<div id="header">
    		<div class="headertext">
    	<h1><a href="<?php bloginfo('siteurl');?>/" title="<?php bloginfo('name');?>">
    <?php bloginfo('name');?> </a></h1>
    <?php bloginfo('name');?> </a></h1>
    		<h4><?php bloginfo('description'); ?></h4>
    		</div><!-- .headertext -->
    	</div><!-- #header -->

    Any help on this would be greatly appreciated!

  2. viv85e
    Posted 3 years ago #

    Aha. After a bit of trial/error I found the solution. If anyone else is having this problem. I suggest using this link as a reference. It helped a lot:


Topic Closed

This topic has been closed to new replies.

About this Topic