Archived topic
GP 1.9.0 update
15 replies · Started by Peery on November 20, 2019
Now shows the header on mobile (only) when selected not to in page settings..
Hi 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 );
Only have nav disabled on 1 page though.
The function I shared above will bring things back to the way it was before 1.9.0 :)
Nevermind... that just removes the nav on the 1 selected page I have.. Thanks for the update ;)
No problem! :)
How would this be done without adding the function in the new update?
Still having the options in page settings to disable elements will throw some peeps off ;)
I'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.
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..
geez... nevermind.. it does have header now..
Yea, 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 options
I like B ... gives user more option.. Thanks Tom... long day ;)
I think I like B as well :)
No problem!
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!
