- This topic has 6 replies, 2 voices, and was last updated 6 years, 7 months ago by
Tom.
-
AuthorPosts
-
August 20, 2016 at 7:43 am #219818
Hans
Hi Tom,
I moved my homepage from localhost to domainserver manually. I want to have a full width background on homepage while nearly all other pages have the same header image. I solved it on local host but I do not remember how I did it.
In hook wp_head I use php:
<meta name="specificfeeds-verification-code" content="ADNMEsxTAk3PnBgDNVfz"/> <?php if ( is_home() ) : ?> <img src='wp-content/uploads/bgimage/rotate.php' id='ktgbild' alt=''> <?php endif; ?>
CSS is as follows
#ktgbild { position: fixed; top: 0; left: 0; /* Preserve aspet ratio */ min-width: 100%; min-height: 100%; z-index: -1; }
The header background is introduced by Appearance, Backgrund Image, Header Area (my Admin is in German – mught be that the name are different).
How can I solve the problem???
August 20, 2016 at 9:03 am #219842Tom
Lead DeveloperLead DeveloperHi there,
First, wp_head is for scripts only – no HTML. You want to add the HTML into the Before Header hook.
Then, instead of this:
wp-content/uploads/bgimage/rotate.php
You need to add the full URL:
http://yoursite.com/wp-content/uploads/bgimage/rotate.php
That should get you closer ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 20, 2016 at 9:49 am #219860Hans
Hi Tom,
I followed your advice. But nothing changed. To understand what I mean here is the URL
http://huppenbroich.de/spd-roetgen/
On home page you see the overlay of the header on top of the full page. I managed somehow to let it disappear. But unfortunately I do not remember. I appreciate your advice.
August 20, 2016 at 12:14 pm #219887Tom
Lead DeveloperLead DeveloperI’m not sure what you mean?
I’m seeing a header with a background image set – all looks normal?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 20, 2016 at 11:58 pm #219991Tom
Lead DeveloperLead DeveloperMaybe something like this will work:
.home .site-header { background: transparent; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 21, 2016 at 12:08 am #219998Hans
Hi Tom,
it works perfectly — many thanks.
August 21, 2016 at 12:13 am #220007Tom
Lead DeveloperLead DeveloperYou’re welcome ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.