Here’s a workaround you can try:
Download the theme zip file
Edit /functions/class-utils-settings-map.php
Change function hu_header_menu_sec() array ‘default’ argument from 1 to 0
/*-----------------------------------------------------------------------------------------------
Header Menu SECTION
------------------------------------------------------------------------------------------------*/
function hu_header_menu_sec() {
return array(
'default-menu-header' => array(
'default' => 0,
'control' => 'HU_controls',
'label' => __("Use a default page menu if no menu has been assigned.", 'hueman'),
'section' => 'header_menu_sec',
'type' => 'checkbox'
)
);
}
Ok understood. Thanks for reporting this. Yes this is a problem and this feature needs to be adapted for multisite in the future.
A possible solution for the moment would be to use a “must use” plugin.
https://codex.ww.wp.xz.cn/Must_Use_Plugins
Create a new must use plugin file if needed and write the following line of code in it :
add_filter('hu_opt_default-menu-header', '__return_false');
This will filter the option whenever it is called in the theme, assigning it to false.
I would recommend this solution rather than modifying the theme itself which is always something to avoid if possible. In this specific case we can and should avoid a hard d’odes modification in the theme.
Thanks for this feedback. The next release will disable this default page menu when multisite is detected.
@nikeo wrote:
I would recommend this solution rather than modifying the theme itself which is always something to avoid if possible.
I agree with this. I was just providing a workaround for the time being; didn’t realize there was a filter available.
@bdbrown, yes your workaround is still valid and useful to solve the problem quickly !
About this filter : it’s actually a filter for which the name is set dynamically. It is declared in functions/class-utils.
apply_filters( "hu_opt_{$option_name}" , $_single_opt , $option_name , $option_group, $_default_val );
It takes hu_opt_ as prefix and the name of the option (as defined in functions/class-utils-settings-map.php ) as suffix.
What it does is each time an option is called, it captures the result and let us act on it.
For boolean type options, typically checkboxes, this filter offers a very simple way to alter the option value with the __return_false and __return_true WordPress built-in callbacks functions.
Thanks Guillaume (dbdrown too). We have our homemade MU plugin. And we use often this plugin because of multisite 😉
Thanks for the filter and to consider needs for multisite in the future =)
OK perfect then. thanks for the feedback.
I got a problem with getting the menu to change when I made a change to the page. Its not updating if I changed the header, fex if had a course named. Food 1, and change the course name to food 2, it dont update. Is this the same problem as described here?