- This topic has 15 replies, 5 voices, and was last updated 6 years, 1 month ago by Leo.
-
AuthorPosts
-
June 2, 2016 at 4:57 pm #199028Valerio
Currently, I have:
Title
Slogan
Logobut I’d like the logo to be on top of the rest.
Couldn’t find the file handling this. How to do that?Thanks!
June 3, 2016 at 12:08 am #199075TomLead DeveloperLead DeveloperHi there,
You can use this function: https://gist.github.com/generatepress/4cfa628cec96088dcbf8dd8cf399b83e
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Just re-arrange the functions in there π
June 3, 2016 at 12:26 am #199082LisaHi, I’m looking for a similar result so I hope it’s ok to use an existing thread (day 1 using GeneratePress and I’ve made more progress in a couple of hours than with the umpteen other themes I tried and couldn’t customize to my satisfaction!)…
I’d like the logo to be between the title and the tagline:
Site title
Logo
TaglineI would also like them all to be aligned to center – can that also be done in the same function?
June 3, 2016 at 12:31 am #199083TomLead DeveloperLead DeveloperHi there,
My answer above should work for you too π
For the alignment, go to Customize – Layout and you’ll see header alignment and navigation alignment.
Hope this helps!
June 3, 2016 at 1:27 am #199099LisaThanks, got the alignment sorted. But I’m after the logo going in between the title and tagline. Can I separate them in the code?
Instead of:
// Site title and tagline
generate_construct_site_title();
// Site logo
generate_construct_logo();I tried this, but it’s definitely not right because it resulted in errors:
// Site title
generate_construct_site_title();
// Site logo
generate_construct_logo();
// Site tagline
generate_construct_tagline();June 3, 2016 at 1:55 am #199103ValerioThank you Tom!
Let me tell you, excellent theme and support. Keep up the great work!
Valerio
June 3, 2016 at 10:03 am #199192TomLead DeveloperLead DeveloperThanks, Valerio! π
Lisa – the title and tagline are wrapped into the same function. In order to separate them, you would need to build your header using custom code in GP Hooks.
You can disable the tagline in the Customizer, then add it to the “After Header Content” hook in GP Hooks like this:
<p class="site-description">Your tagline here</p>
June 3, 2016 at 4:17 pm #199256LisaThanks – I’ll have a look today. I’ve been meaning to take a look at GP Hooks!
June 3, 2016 at 5:13 pm #199260LisaAlmost got it… it causes the logo to go slightly out of alignment (centered). Adding padding to the left causes it to be mis-aligned in mobile view.
In ‘Layout’ I have header alignment set to center, and at the moment I also have CSS code to add the padding which makes it appear centered on desktop view.
What am I missing?
June 3, 2016 at 11:36 pm #199282TomLead DeveloperLead DeveloperHard to tell without actually seeing the site.
Having a header widget in there can cause the center alignment to mess up.
You can apply CSS to desktop only with this media query:
@media (min-width: 769px) { /* CSS in here for desktop only */ }
June 4, 2016 at 2:28 am #199306LisaAh, yes – it was a widget (social icons). I’m sure I can find somewhere else to put them instead of adding code.
Thanks for your help (so far – I think I might have a couple more questions but will see how I go).
Absolutely love GeneratePress and Add-ons!
June 4, 2016 at 10:50 am #199433TomLead DeveloperLead DeveloperGlad I could help π
March 8, 2018 at 11:58 pm #515343fedaeI need to do the same swap logo and title position but I really don”t get where to use this function
You can use this function: https://gist.github.com/generatepress/4cfa628cec96088dcbf8dd8cf399b83eit’s not cleae for me, in witch file ? I have tried in my child theme css, but it does’nt work, can you be more explicite for peopole like me ?
ThanksMarch 9, 2018 at 8:57 am #515713LeoStaffCustomer SupportHi there,
It’s a function/PHP so try this: https://docs.generatepress.com/article/adding-php/#use-a-child-theme
March 10, 2018 at 12:12 am #516156fedaeI have seen it and I have a child theme but my question is very simple, in witch file do i copy theses lignes
I understand that for professionals it is obvious, but having never done it I do not know or copy these linesif ( ! function_exists( ‘generate_header_items’ ) ) :
/**
* Build the header
*
* Wrapping this into a function allows us to customize the order
*
* @since 1.2.9.7
*/
function generate_header_items()
{
// Header widget
generate_construct_header_widget();// Site title and tagline
generate_construct_site_title();// Site logo
generate_construct_logo();
}
endif; -
AuthorPosts
- You must be logged in to reply to this topic.