- This topic has 11 replies, 2 voices, and was last updated 6 years, 3 months ago by
Leo.
-
AuthorPosts
-
July 2, 2017 at 7:03 am #342832
Killian
I have a static home page with a header and sticky mobile header the http://www.artobatours.com/. For my Posts Page and Posts, I want a different header: I only want it to appear like the sticky mobile header, except I don’t want the header bar to be transparent as it is for the other pages. How can I do this?
July 2, 2017 at 8:53 am #342872Leo
StaffCustomer SupportHi there,
Sorry not quite sure what you are after…so different style of header for blog page and single posts?
Or you are referring to different menu item?
July 2, 2017 at 9:13 am #342887Killian
Hi, different style of header for blog page and single posts
July 2, 2017 at 9:18 am #342892Leo
StaffCustomer SupportSo basically a different style for the logo and site title part?
If so you can use the the before header content hook:
http://demo.generatepress.com/hook-locations/
https://docs.generatepress.com/article/hooks-overview/With conditional tag like this and check execute PHP
<?php if ( is_single() || is_home() ) : ?> <div class="header_banner"> Your stuff in here </div> <?php endif; ?>
July 2, 2017 at 9:25 am #342903Killian
So basically a different style for the logo and site title part?
If so you can use the the before header content hook:
http://demo.generatepress.com/hook-locations/
https://docs.generatepress.com/article/hooks-overview/With conditional tag like this and check execute PHP
<?php if ( is_single() || is_home() ) : ?> <div class="header_banner"> Your stuff in here </div> <?php endif; ?>
And this will replace the normal style of header, and replace it with the sticky mobile header only, even if see on non-mobile device?
July 2, 2017 at 9:58 am #342920Leo
StaffCustomer SupportHmm I can’t picture what you are after…so you are wanting slideout menu only on blog and posts pages?
July 2, 2017 at 10:21 am #342930Killian
I have a page http://www.artobatours.com/ that has a header with a logo and a site title and tagline, and below this is a menu bar with links and the bar is transparent. In mobile view, the header with a logo and a site title and tagline are not visible, and the links on the menu bar are seen as the hamburger icon, and the menu bar has a small logo.
I want to keep them as is.
For the blog and posts pages I do not want to see large logo, site title, and tagline: I only want to see the menu bar like it appears as if viewed on mobile device (whether viewed on desktop or mobile), i.e. with small logo and hamburger icon. But, I do not want the menu bar to be transparent.
I hope that explains.
July 2, 2017 at 10:36 pm #343207Leo
StaffCustomer SupportOk a bit long but try this CSS:
@media (max-width: 2000px) { .blog .main-navigation .menu-toggle, .archive .main-navigation .menu-toggle, .single .main-navigation .menu-toggle { display: block; } .blog .main-navigation ul, .archive .main-navigation ul, .single .main-navigation ul { display: none; } .blog .main-navigation.toggled .main-nav > ul, .archive .main-navigation.toggled .main-nav > ul, .single .main-navigation.toggled .main-nav > ul { display: block; } .blog .main-navigation .main-nav ul ul, .archive .main-navigation .main-nav ul ul, .single .main-navigation .main-nav ul ul { position: relative; top: 0; left: 0; width: 100%; } .blog .main-navigation .main-nav .sf-menu > li, .archive .main-navigation .main-nav .sf-menu > li, .single .main-navigation .main-nav .sf-menu > li { float: none; clear: both; display: block !important; text-align: left !important; } .blog .main-navigation .sub-menu.toggled-on, .blog .main-navigation .children.toggled-on, .archive .main-navigation .sub-menu.toggled-on, .archive .main-navigation .children.toggled-on, .single .main-navigation .sub-menu.toggled-on, .single .main-navigation .children.toggled-on { display: block !important; opacity: 1 !important; } .blog .main-navigation .dropdown-menu-toggle:before, .archive .main-navigation .dropdown-menu-toggle:before, .single .main-navigation .dropdown-menu-toggle:before { content: "\f107" !important; } .blog .main-navigation .sfHover > a .dropdown-menu-toggle:before, .archive .main-navigation .sfHover > a .dropdown-menu-toggle:before, .single .main-navigation .sfHover > a .dropdown-menu-toggle:before { content: "\f106" !important; } .blog .main-navigation .menu-item-has-children .dropdown-menu-toggle, .archive .main-navigation .menu-item-has-children .dropdown-menu-toggle, .single .main-navigation .menu-item-has-children .dropdown-menu-toggle { float: right; } .blog .main-navigation .mobile-bar-items, .archive .main-navigation .mobile-bar-items, .single .main-navigation .mobile-bar-items { display: block; } .blog .main-navigation .menu li.search-item, .archive .main-navigation .menu li.search-item, .single .main-navigation .menu li.search-item { display: none !important; } .blog .main-navigation .sf-menu > li.menu-item-float-right, .archive .main-navigation .sf-menu > li.menu-item-float-right, .single .main-navigation .sf-menu > li.menu-item-float-right { float: none !important; display: inline-block; } .blog [class*="nav-float-"] .site-header .inside-header > *, .archive [class*="nav-float-"] .site-header .inside-header > *, .single [class*="nav-float-"] .site-header .inside-header > * { float: none; clear: both; } }
Adding CSS: https://docs.generatepress.com/article/adding-css/
Tom is researching ways to initiate the mobile menu using a simple filter π
August 22, 2017 at 9:17 am #371340Killian
Tom is researching ways to initiate the mobile menu using a simple filter
Hi, any progress on a filter? I never used the very long CSS approach.
August 22, 2017 at 10:37 am #371400Leo
StaffCustomer SupportSorry not a simple feature so it still needs extensive testing.
Is the CSS code not working?
August 22, 2017 at 11:00 am #371417Killian
OK,
Is the CSS code not working?
I was waiting for the ‘simpler’ filter π
August 22, 2017 at 11:51 am #371450Leo
StaffCustomer SupportYeah it needs more testing. Stay tuned π
-
AuthorPosts
- You must be logged in to reply to this topic.