- This topic has 2 replies, 2 voices, and was last updated 9 years, 3 months ago by .
- The topic ‘Making background clickable on all pages except home page’ is closed to new replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
We're trying to come up with a solution to a design issue we're having right now, concerning a wallpaper advert that has to appear on all pages except the home page AND has to be clickable on all pages except the home page.
Following an earlier thread's suggestion I am now able to make the background image disappear by editing home.php, this solves the first problem.
But I can't seem to find a solution to change the clickability of the home page.
I'm currently making the background clickable using the Genesis Hooks plugin to introduce a clickable div as the header starts, and then wrapping the content area in another div, defining z-indexes for both in style.css so it's not the entire blog that becomes clickable.
But since Hooks are globally loaded, I don't know how I can disable the background's clickability on the home page while retaining clickability on all other pages.
Do you know of a way we could not only disable the background image from the home page but also make clickability dependent on whether the user has loaded the home page or not?
Is there something perhaps I could add to home.php that would make the site disregard some of the custom hooks?
(I tried to solve this with the Background Manager plugin but it's a very resource-intensive plugin and our current server configuration can't take the load if it's turned on, so I have to find a way to do this in code.)
Thank you in advance.
You can add a conditional statement to whatever code you are using - http://codex.wordpress.org/Conditional_Tags - !is_home() or !is_front_page().
Love coffee, chocolate and my Bella!
Excellent, it works wonderfully!
Thank you so much, this saves my day. 🙂
© 2023 WPEngine, Inc.