- This topic has 15 replies, 4 voices, and was last updated 2 years ago by
Leo.
-
AuthorPosts
-
November 20, 2019 at 2:17 pm #1069218
Wes Peery
Now shows the header on mobile (only) when selected not to in page settings..
November 20, 2019 at 2:25 pm #1069229Tom
Lead DeveloperLead DeveloperHi there,
This was intentional, as we now hide the navigation only if the navigation itself is set to disable.
It looks like we might need to add a “Mobile Header” option to Disable Elements. For now, since this is sort of edge-case, we can provide a function to fix this for you:
add_action( 'wp', function() { $disable_nav = get_post_meta( get_the_ID(), '_generate-disable-nav', true ); if ( $disable_nav ) { remove_action( 'generate_after_header', 'generate_menu_plus_mobile_header', 5 ); } }, 100 );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 20, 2019 at 2:26 pm #1069232Wes Peery
Only have nav disabled on 1 page though.
November 20, 2019 at 2:27 pm #1069234Tom
Lead DeveloperLead DeveloperThe function I shared above will bring things back to the way it was before 1.9.0 π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 20, 2019 at 2:28 pm #1069235Wes Peery
Nevermind… that just removes the nav on the 1 selected page I have.. Thanks for the update π
November 20, 2019 at 2:28 pm #1069237Tom
Lead DeveloperLead DeveloperNo problem! π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 20, 2019 at 2:28 pm #1069238Wes Peery
How would this be done without adding the function in the new update?
November 20, 2019 at 2:30 pm #1069242Wes Peery
Still having the options in page settings to disable elements will throw some peeps off π
November 20, 2019 at 2:31 pm #1069243Tom
Lead DeveloperLead DeveloperI’m not sure I understand? The new update makes it so only the navigation is disabled when the navigation is selected to be disabled. The Mobile Header itself is more of a header than just navigation, which is why we made the change.
The function above is necessary if you want to include the Mobile Header in what gets disabled when “Primary Navigation” is selected.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 20, 2019 at 2:37 pm #1069250Wes Peery
I done got all confused now lmao… why not add option to disable “header” as well in the page options.. Have a feeling this update will throw some peeps off… as they select to disable navigation in page settings which remove the header and navigation from the page (in previous version)… But… after they update… the desktop was still disabled for the header and nav… but only mobile showed the header now.. but nav was gone..
November 20, 2019 at 2:39 pm #1069254Wes Peery
geez… nevermind.. it does have header now..
November 20, 2019 at 2:40 pm #1069256Tom
Lead DeveloperLead DeveloperYea, there is a header option as well.
So the choice we’ll have to make in GPP 1.10 is to either:
a) Disable the Mobile Header if the “Header” is disabled
b) Add a “Mobile Header” option along with the other Disable Elements optionsDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 20, 2019 at 2:41 pm #1069261Wes Peery
I like B … gives user more option.. Thanks Tom… long day π
November 20, 2019 at 2:44 pm #1069265Tom
Lead DeveloperLead DeveloperI think I like B as well π
No problem!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMay 23, 2020 at 12:33 pm #1298431Gerard
Hi Tom! Another vote for this, it’s really confusing that the mobile header doesn’t get disabled when all elements are disabled in the page settings. I get your point that it’s more of a header than navigation, but still, we need some option to disable it per page basis, without having to search on the forums what’s going on and having to add extra code.
Option B is the most conservative, but I’m really not aware of any situation in which a user could want to disable header and navigation but not the mobile header, so maybe I would simplify things with option A. But you said that this change was intentional, so I’ll assume that there were some cases where this was necessary, in that case, option B should be the way to go.
Is there a release date for 1.10?So we are already in version 1.10 and this fix wasn’t included! -
AuthorPosts
- You must be logged in to reply to this topic.