- This topic has 31 replies, 3 voices, and was last updated 3 years, 5 months ago by Elvin.
-
AuthorPosts
-
October 23, 2020 at 4:15 am #1501021Royal Rangers
Hi, how I can set this?
1) I set a header and mobile logo via Elements. How I set a sticky logo for different pages and category?
2) How set different a logo link for different pages and category?
3) How set submenu color on specific pages and category?
4) How set offcanvas menu color on specific pages and category?Thanks for help.
October 23, 2020 at 10:57 am #1501611LeoStaffCustomer SupportHi there,
1) This filter should work:
https://docs.generatepress.com/article/option_generate_menu_plus_settings/#sticky_menu_logoSee some examples here: https://generatepress.com/forums/search/option_generate_menu_plus_settings/
2) Give filter a shot first:
https://docs.generatepress.com/article/generate_logo_href/3) CSS is required. You can see all the CSS associated with the menu here:
https://docs.generatepress.com/article/changing-navigation-colors/Then you just need to target the specific pages or categories. For example,
.main-navigation .main-nav ul ul li a
becomes
body.page-id-xxx .main-navigation .main-nav ul ul li a
4) The CSS should be similar to #3. So
.main-navigation .main-nav ul ul li a
becomes
.slideout-navigation.main-navigation .main-nav ul ul li a
October 23, 2020 at 2:37 pm #1501807Royal RangersHi thanks for response.
1) Works, but… Sticky logo is main from web when i resize windows. I see both logos too.add_filter( 'option_generate_menu_plus_settings','ringoturnaj_sticky' ); function ringoturnaj_sticky( $options ) { if ( is_page( array(14901,15068,15058,15060,15062,15066,15064,15070,15072,15056,14916,15074,15076) ) || is_category('ringoturnaj') ) { $options['sticky_menu_logo'] = 'https://www.mywebsite.cz/wp-content/uploads/2020/Logo-male-bile.png'; $options['sticky_menu'] = 'true'; } return $options; }
2) Works, but… In specific page and category is ok. On the main web is link on the actual page where I am actually.
add_filter( 'generate_logo_href', function() { if ( is_page( array(14901,15068,15058,15060,15062,15066,15064,15070,15072,15056,14916,15074,15076) ) || is_category('ringoturnaj') ) return "https://www.myweb.cz/ringoturnaj/"; } );
3) Works. I set this via hooks.
4) Works. i set this via hooks.
5) I try change color of site-info via hook on specific pages and category. Doesnť work..site-info { color: #ffffff; background-color: #000000; }
Can you see on code?
October 23, 2020 at 5:20 pm #1501872LeoStaffCustomer Support1) Are you still using the old navigation logo option in the customizer?
If so can you remove that first?
2) Not sure if I understand. Can you explain a bit more?
5) Can you try adding CSS using one of these methods instead of hooks?
Adding CSS: https://docs.generatepress.com/article/adding-css/October 23, 2020 at 11:25 pm #1501993Royal Rangers1) When I delete sticky navigation logo from customizer so sticky logo is displaying on specific pages only. Other pages missing. When I resized windows I see default mobile logo too.
2) Try https://www.royalrangers.cz/blog/. Logo link is on the same page. On specific page which i defined in code works.
5) In customizer works, but I need this on specific page only. I try create hook wp_footer but doesn´t work. Code is viewing as plaintext under classic footer.October 24, 2020 at 10:42 am #1502656LeoStaffCustomer SupportCan you first clear and deactivate the caching plugin so I can take a closer look?
Please make sure this is always done when we are trying to help:
https://www.screencast.com/t/LLvPDBka1) Do you have a navigation logo uploaded in the customizer under Layout > Customizer?
2) What is the code that you’ve added there?
5) CSS should not be added using a hook. Try one of the methods I provided and target specific pages:
body.page-id-xxx .site-info { color: #ffffff; background-color: #000000; }
Please split up your questions to multiple topics next time so it’s easier to handle:
https://www.screencast.com/t/DHKUymD43FDWe would really appreciate it if you can try to follow the forum guidelines so it’s easier for us to help.
Thanks!
October 24, 2020 at 1:02 pm #1502759Royal RangersHi, cache plugin is deactivated.
1) Yes. In customizer I have uploaded default sticky and mobile logo. On specific pages I have uploaded another logo and mobile logo via Elements. Sticky logo for specific pages I set in functions.php
add_filter( 'option_generate_menu_plus_settings','ringoturnaj_sticky' ); function ringoturnaj_sticky( $options ) { if ( is_page( array(14901,15068,15058,15060,15062,15066,15064,15070,15072,15056,14916,15074,15076) ) || is_category('ringoturnaj') ) { $options['sticky_menu_logo'] = 'https://www.royalrangers.cz/wp-content/uploads/2020/Logo-male-bile.png'; $options['sticky_menu'] = 'true'; } return $options; }
2) This code:
add_filter( 'generate_logo_href', function() { if ( is_page( array(14901,15068,15058,15060,15062,15066,15064,15070,15072,15056,14916,15074,15076) ) || is_category('ringoturnaj') ) return "https://www.royalrangers.cz/ringoturnaj/"; } );
Maybe i can disable logo link totally.
5) Ok. I think that it works via hooks.
Sorry for inconviences. Next time I split my questions.
October 24, 2020 at 2:37 pm #1502812LeoStaffCustomer SupportCan you provide the dashboard login for me to take a look?
October 24, 2020 at 11:04 pm #1503003Royal RangersAccess granted.
October 25, 2020 at 10:06 am #1503721LeoStaffCustomer SupportLet’s take care of one question at a time.
1) Try adding this CSS:
.page-id-14901 .sticky-navigation-logo { display: none !important; }
October 25, 2020 at 12:30 pm #1503845Royal RangersOctober 26, 2020 at 8:44 am #1504991LeoStaffCustomer SupportYou will need to target the pages like this:
.page-id-14901 .sticky-navigation-logo, .page-id-xxxx .sticky-navigation-logo, .page-id-xxxxx .sticky-navigation-logo { display: none !important; }
Are you using this filter already?
https://docs.generatepress.com/article/generate_mobile_header_logo/October 26, 2020 at 2:36 pm #1505389Royal RangersHi, it works. Last problem is with logo link now. Try https://www.royalrangers.cz/blog/. Logo link is on the same page.
On specific pages code works.
add_filter( 'generate_logo_href', function() { if ( is_page( array(14901,15068,15058,15060,15062,15066,15064,15070,15072,15056,14916,15074,15076) ) || is_category('ringoturnaj') ) return "https://www.myweb.cz/ringoturnaj/"; } );
October 26, 2020 at 2:44 pm #1505395ElvinStaffCustomer SupportHi,
You have to add
is_home()
to your condition.Example:
add_filter( 'generate_logo_href', function() { if ( is_page( array(14901,15068,15058,15060,15062,15066,15064,15070,15072,15056,14916,15074,15076) ) || is_category('ringoturnaj') || is_home() ) return "https://www.myweb.cz/ringoturnaj/"; } );
October 26, 2020 at 10:25 pm #1505615Royal RangersDon´t work. Customize logo link I need only on specific page and category.
-
AuthorPosts
- You must be logged in to reply to this topic.