- This topic has 15 replies, 4 voices, and was last updated 5 years, 4 months ago by
Leo.
-
AuthorPosts
-
November 20, 2019 at 2:17 pm #1069218
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 );
November 20, 2019 at 2:26 pm #1069232Peery
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 ๐
November 20, 2019 at 2:28 pm #1069235Peery
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! ๐
November 20, 2019 at 2:28 pm #1069238Peery
How would this be done without adding the function in the new update?
November 20, 2019 at 2:30 pm #1069242Peery
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.
November 20, 2019 at 2:37 pm #1069250Peery
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 #1069254Peery
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 optionsNovember 20, 2019 at 2:41 pm #1069261Peery
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!
May 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.