Archived topic
Different home page header
11 replies · Started by Joachim Voigt on October 10, 2015
Hi .. I searched the forum but did not find the conclusive instructions I need... I need to accomplish two things:
1. Define a front page header area different from regular pages (larger)
2. Place a slider short code in the front page header area only
[All GP add-ons on board]
many thx
Jo
Hi there,
Our GP Hooks add-on is your best bet here.
1. Go to "Customize > Site Identity" and remove any site title, logo, tagline etc..
2. Go to "Appearance > GP Hooks" and add something like this to the "Before Header Content" hook:
<?php if ( is_front_page() ) : ?>
<div class="site-logo">
<a href="YOUR WEBSITE URL" title="YOUR WEBSITE TITLE" rel="home"><img class="header-image" src="URL TO YOUR HOMEPAGE HEADER" alt="YOUR WEBSITE TITLE" title="YOUR WEBSITE TITLE"></a>
</div>
YOUR SLIDER CAN GO HERE AS WELL
<?php else :
<div class="site-logo">
<a href="YOUR WEBSITE URL" title="YOUR WEBSITE TITLE" rel="home"><img class="header-image" src="URL TO YOUR REGULAR PAGE HEADER" alt="YOUR WEBSITE TITLE" title="YOUR WEBSITE TITLE"></a>
</div>
<?php endif; ?>
Then be sure to "Execute PHP".
Let me know if you need more info :)
Hi Tom. A logo are not be displayed on archived blog pages with the additional or
condition.
<?php if ( is_front_page() || is_archive() ) : ?>
<div class="site-logo">
<?php putRevSlider('classicslider', 'homepage'); ?>
</div>
<?php else : ?>
<div class="site-logo">
<a href=""><img class="header-image" src="../"></a>
</div>
<?php endif; ?>
Thank you.
Marko
What the above should do is show the slider on your front page and archive pages (categories, archives, tags etc..) and then show the regular image on all other pages.
Is that not what's happening?
Hi Tom. Slider only on the start page and on all other sites the Logo should be displayed. The Logo will not be displayed on archived posts and posts with category, only on the start page of the blog.
Marko
Hmm I'm not sure I understand.
The slider only on the front page.
The logo on every other page, except for archives and categories?
What is displayed on archives and categories?
Hi Tom. With the previous code no logo will be displayed in archives and categories. There is a white space in the top with the following html code.
<div class="inside-header grid-container grid-parent">
<div class="site-logo">
</div>
</div>
Marko
Hi Tom. Please check on http://dev.webseite-online.de
The website title will also not be displayed on pages with the logo.
I use this code for the logo.
<div class="site-logo">
<a href="YOUR WEBSITE URL" title="YOUR WEBSITE TITLE" rel="home"><img class="header-image" src="URL TO YOUR REGULAR PAGE HEADER" alt="YOUR WEBSITE TITLE" title="YOUR WEBSITE TITLE"></a>
</div>
Marko
Any chance you can send me temporary login details to support@generatepress.com? There's no real way for me to know what's going wrong.
One thing - you should put the full URL to the image in with the http:// and everything - not just the wp-content/... part.
Hi Tom. It work's with the full qualified url in the php code. The company name and slogan must be insert in the theme -> site identity and set to hidden, otherwise the company name does not appear in the browser title.
Thank for your great support.
Marko
Please close this topic. I couldn't set it to resolved.
Glad I could help!
