Trying to add script to specific admin page is not working

I think you’re using the wrong approach. Rather than removing the submenu item, alter how the post type was registered, and change the show_in_menu argument. Hook into init way late and change the argument. <?php add_action(‘init’, ‘wpse99123_post_type_switcher’, 999); function wpse99123_post_type_switcher() { global $wp_post_types; $wp_post_types[‘contact’]->show_in_menu = true; // put it back in the menu } Then, … Read more

menu_order not working with slugs that start with admin.php

Remove ‘admin.php?page=” from those values. “admin.php?page=custom_settings_page’ should be ‘custom_settings_page’ ‘admin.php?page=gf_edit_forms’ should be ‘gf_edit_forms’ Values that start with admin.php only have their parameter set in the global default menu order array (global $default_menu_order). So when the sort occurs between your custom menu order array and the global default menu menu order array, it won’t correctly match … Read more

Change URL of plugin admin menu

Solution – add_action( ‘admin_menu’, ‘wpse_admin_menu’, 100 ); function wpse_admin_menu() { global $menu, $submenu; $parent=”gf_edit_forms”; if( !isset($submenu[$parent]) ) return; foreach( $submenu[$parent] as $k => $d ){ if( $d[‘2’] == ‘gf_entries’ ) { $submenu[$parent][$k][‘2’] = ‘admin.php?page=gf_entries&id=2’; break; } } }

Create Logout Link WordPress Admin Menu

You can use the awesome WP_Admin_Bar & hook in with admin_bar_menu: /** * Add a “Log out” link directly to the admin bar. * * @link http://wordpress.stackexchange.com/q/141446/1685 * * @param WP_Admin_Bar $wp_admin_bar */ function wpse_141446_admin_bar_logout( $wp_admin_bar ) { if ( is_user_logged_in() ) { $wp_admin_bar->add_menu( array( ‘id’ => ‘my-log-out’, ‘parent’ => ‘top-secondary’, ‘title’ => __( ‘Log … Read more

$wp_customize->remove_section for customizer setting?

Assuming you are trying to remove the default nav_menus panel, you have the id wrong. Also, you’ll need to add a priority of at least 20 to the customize_register hook, assuming you’re using that hook. function remove_customizer_settings( $wp_customize ){ $wp_customize->remove_panel(‘nav_menus’); } add_action( ‘customize_register’, ‘remove_customizer_settings’, 20 );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)