- This topic has 15 replies, 5 voices, and was last updated 8 years, 3 months ago by
Leo.
-
AuthorPosts
-
December 8, 2016 at 5:50 am #252687
Daniel
Hi Tom,
Can You please instruct me how do I replace mobile header logo to present site title and site tag line insted?
I have access to theme files, and know css so I can do later design adjustments.
just need your help with file location and function that will replace current logic that allows only logo upload and presentation on header mobile
Thanks,
Daniel.TDecember 8, 2016 at 10:48 am #252767Tom
Lead DeveloperLead DeveloperHi Daniel,
You can use the generate_inside_mobile_header hook:
add_action( 'generate_inside_mobile_header','tu_mobile_header_html' ); function tu_mobile_header_html() { ?> <div class="mobile-header-content"> Your site title etc.. </div> <?php }Then style it:
.mobile-header-content { float: left; /* etc.. */ }Hope this helps 🙂
December 9, 2016 at 1:27 am #252928Daniel
thanks for the hook it helped 🙂
December 9, 2016 at 10:23 am #253045Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
December 17, 2016 at 9:26 am #255702Mathias
Hello,
where do I enter this code-snippet?
add_action( 'generate_inside_mobile_header','tu_mobile_header_html' ); function tu_mobile_header_html() { ?> <div class="mobile-header-content"> Your site title etc.. </div> <?php }December 17, 2016 at 9:41 am #255705Mathias
Hello Tom,
I also would like the site title and the menu toggle in one line with the site title floating left and the menu toggle button floating right (hamburger menu).
See my site: upconversion.de
How can I achieve it?
thanksDecember 17, 2016 at 10:34 am #255714Tom
Lead DeveloperLead DeveloperThis should help: https://generatepress.com/knowledgebase/adding-php-functions/
Adding the float:left CSS mentioned above should do that for you 🙂
December 19, 2017 at 9:43 am #453108CRISTO
It says add to place the code in “generate_inside_mobile_header hook” I don’t see that as an option in GP hooks. Am I looking in the wrong place?
December 19, 2017 at 1:15 pm #453290Leo
StaffCustomer SupportThat hook is not included in the hook module as it’s not commonly needed so you will have to add it as a snippet:
https://generatepress.com/forums/topic/site-title-instead-on-logo-on-mobile-heder/#post-255702
https://generatepress.com/forums/topic/site-title-instead-on-logo-on-mobile-heder/#post-255714December 19, 2017 at 2:31 pm #453347CRISTO
Add it where?
December 19, 2017 at 3:24 pm #453387Leo
StaffCustomer SupportDecember 19, 2017 at 3:49 pm #453398CRISTO
I did it…sort of. Text is black whereas I wanted white, so just need to know how to change the text color. Here is my site.
December 19, 2017 at 4:21 pm #453410Leo
StaffCustomer SupportNicely done!
Now we can just add the color to the current CSS you have:
.mobile-header-content { float: left; color: #ffffff; }December 19, 2017 at 6:08 pm #453444CRISTO
Fantastic….thanks Leo. Worked out just like I wanted.
December 19, 2017 at 6:16 pm #453445CRISTO
Of course if you could make it jump around, change colors, etc. JUST KIDDING!
-
AuthorPosts
- You must be logged in to reply to this topic.