- This topic has 4 replies, 2 voices, and was last updated 8 years, 2 months ago by
Leo.
-
AuthorPosts
-
February 7, 2018 at 11:44 am #490692
Jeffrey
Hello, there are two questions, sorry that I just opened one a ticket.
1. I would like to use two different menus for two different parts of the page, for example, homepage and other pages using a menu, and when users logged in, will show another menu to logged users, it should be a common question, how can I achieve this?2. I have set sticky menu on a homepage, but if I want to set static menu for others, how I should do?
Thank you for your powerful and extreme lightweight theme.February 7, 2018 at 1:44 pm #490799Leo
StaffCustomer SupportHi there,
1. This might help: https://generatepress.com/forums/topic/login-logout-menu/#post-219830
2. Try this snippet with your current setting:
add_filter( 'option_generate_menu_plus_settings','lh_home_only_sticky_menu_setting' ); function lh_home_only_sticky_menu_setting( $options ) { if ( ! is_front_page() ) { $options[ 'sticky_menu' ] = 'false'; } return $options; }Adding PHP: https://docs.generatepress.com/article/adding-php/
February 8, 2018 at 8:09 pm #491815Jeffrey
Hi Leo,
if ( ! is_front_page() ), if I want to deny a specific page except font page? for example, the page id is 898. how should I do? Thank you so much!February 8, 2018 at 9:03 pm #491836Jeffrey
Hi Leo, I have tried to replace the if ( ! is_front_page() ) to if (is_page(60321), that means that I want to set the static menu for the page only which page id is 60321, that works fine now, but mobile devices, could you please give a way to set both desktop and mobile devices? thank you.
additionally, I just want to fix the menu and header for both mobile and desktop on this page, on a desktop, I add a pice of code like
header#masthead.site-header{
z-index: 100;
position: fixed;
/* height: 100%; */
width: 100%;
padding: 0px;
border-width: 0px;
margin: 0px;
left: 0px;
top: 0px;
}but on mobile this class may not be right. on a mobile device, what I need to do?
Cheers
February 8, 2018 at 9:25 pm #491846Leo
StaffCustomer SupportNot quite sure what you mean. Can you specify your overall conditional now?
I think this maybe the look you are going for with the fixed header? https://docs.generatepress.com/article/navigation-logo/#navigation-as-header
Can you open separate topics for different questions? It’s much easier for us to track what’s going on.
-
AuthorPosts
- You must be logged in to reply to this topic.