the screen option button is missing in all page
]]>function custom_add_menu_meta_box( $object ) {
add_meta_box( 'custom-menu-metabox', __( 'Default Menus' ), 'custom_menu_meta_box', 'nav-menus', 'side', 'default' );
return $object;
}
add_filter( 'nav_menu_meta_box_object', 'custom_add_menu_meta_box', 10, 1);
I have created a menu meta box named Default Menus.
Here is the function implementation.
function custom_menu_meta_box(){
global $nav_menu_selected_id;
$custom_nav_menu_options = json_decode(get_option('ds_custom_nav_menu'));
$generatedMenu = [];
for($i = 0; $i < count($custom_nav_menu_options); $i++) {
$singleMenu = $custom_nav_menu_options[$i];
array_push($generatedMenu, (object) [
'ID' => 1,
'object_id' => 1,
'type_label' => 'default',
'title' => $singleMenu->pageTitle,
'url' => $singleMenu->link,
'type' => 'default',
'object' => 'default',
'db_id' => 0,
'menu_item_parent' => 0,
'post_parent' => 0,
'target' => '',
'attr_title' => '',
'description' => '',
'classes' => array(),
'xfn' => '']);
}
$db_fields = false;
// If your links will be hierarchical, adjust the $db_fields array below
if ( false ) {
$db_fields = array( 'parent' => 'parent', 'id' => 'post_parent' );
}
$walker = new Walker_Nav_Menu_Checklist( $db_fields );
$removed_args = array( 'action', 'customlink-tab', 'edit-menu-item', 'menu-item', 'page-tab', '_wpnonce', );
?>
<div id="plugin-slug-div">
<div id="tabs-panel-plugin-slug-all" class="tabs-panel tabs-panel-active">
<ul id="plugin-slug-checklist-pop" class="categorychecklist form-no-clear" >
<?php echo walk_nav_menu_tree( array_map( 'wp_setup_nav_menu_item', $generatedMenu ), 0, (object) array( 'walker' => $walker ) ); ?>
</ul>
<p class="button-controls">
<span class="add-to-menu">
<input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-plugin-slug-menu-item" id="submit-plugin-slug-div" />
<span class="spinner"></span>
</span>
</p>
</div>
<?php
}
I have given type ‘type’ => ‘default’
But how can I get url of this menu while I am going to show it’s not giving me url. But If I use custom, then it is giving me url with this code below:
$menu_item->url = ! isset( $menu_item->url ) ? get_post_meta( $menu_item->ID, '_menu_item_url', true ) : $menu_item->url;
]]>After adding the filter apply_filters( “set_screen_option_{$option}”, false, $option, $value ); on line 728 in the /wp-admin/includes/misc.php the screen option is not working.
For me, after using the same function for both of the filters it worked fine. But, is it the proper way?
Thanks in advance
I’m facing a bug in my wordpress backend. Whatever menu I’m browsing in the backend, if I use the “screen option” on the top to filter a language content (French and English in my website), the relevant flag is removed from the header of the table but the information stays the same, no filter applies.
Could you please help me?
]]>After upgrading to latest version(3.4) of Badgeos, Screen option is not working admin panel.
Please find the following error which i have found
Domain/plugins/badgeos/js/jquery.autocomplete.multiselect.js?ver=4.9.8 net::ERR_ABORTED 404 (Not Found)
]]>In the “Screen Options” drop down menu, I don’t see “Tags” as an option. How can I add it as an option and check it?
In the “All Post” it is available, but not in “All Product”
]]>Thank you
]]>I recently started helping a friend of mine with her website.
everything was working just fine until I noticed that media page, Screen Options and Help tabs were not showing up.
I read a lot of articles of people experiencing the same issues, but I can’t find the solution.
I need Screen Option to work in order to place a language switcher on the main menu.
I’m running the latest WP version and the latest Divi theme options. I’ve tried to disable all the plugins and switch to the default theme but nothing happens.
When I go to the console 3 errors show up: https://imgur.com/a/qf9at
It’s very strange because the plugin qTranslate was deleted a while ago, when I started to redesign the website and replaced by polylang.
I’m not a code expert, can someone help me out?
]]>