|
|
#1 |
|
Hyperlinking within php?
Personally, I've given up on wordpress - I can bs my way through a pretty nice looking website with html and css in DW, but all this php business has my head spinning...
![]() My wife's site has a header banner and for whatever reason this particular theme does not allow for the provision to make that header banner image a clickable "back to home" link. I've given it my all, and only managed to break the site over and over. Thank goodness for backups! This is where I [think] i've narrowed the code relating to the image to be, in the header.php file: Code:
<?php do_action( 'instamate_before_header' ); ?>
<?php $header_image = get_header_image();?>
<header id="branding" class="clearfix" role="banner"<?php if ( ! empty( $header_image ) ) { ?> style="background: url(http://www.starobryan.com/wp-content/uploads/2012/12/logo2.jpg) no-repeat top center;max-width: <?php echo get_custom_header()->width; ?>px; min-height: <?php echo get_custom_header()->height; ?>px;"<?php } ?>>
__________________
OMG its teh Zune phone!!!11!!!!!!one!!!1! |
|
|
|
0
|
|
|
#2 |
|
The way that header is being handled it makes it almost impossible to link it. The header image is a css background image. The site title is a clickable link as a should be in a Wordpress site, but is hidden with css.
I see a few ways it could be done.
__________________
MacBook Pro 13", 2.53ghz C2D, 8GB Ram, 640GB HDD, ML | iPhone 5 32GB | iPad 3 64GB
|
|
|
|
0
|
|
|
#3 |
|
A cheap fix (noting the advice of jsm4182 is for far better long term solutions):
As your site uses jQuery: Code:
$("header#branding").click(function () {
$(window).attr("location","/");
});
Code:
document.getElementsByTagName('header').addEventListener('click',goHome,false);
function goHome() {
window.location.href="/";
}
Add either into the theme's script.js where appropriate.
__________________
Jim Goldbloom Sr. Web Developer, owner GoldTechPro, LLC http://www.GoldTechPro.com
|
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 08:45 AM.










Jim Goldbloom
Linear Mode
