WordPress plugins add parent menu option in admin main right

That’s because it’s a helper function for adding pages to the settings section, not the lower level API you expected: This function is a simple wrapper for a call to add_submenu_page(), passing the received arguments and specifying options-general.php as the $parent_slug argument. This means the new options page will be added as a sub menu … Read more

Removing custom taxonomies from the admin menu

Referencing register_taxonomy() https://codex.wordpress.org/Function_Reference/register_taxonomy show_in_menu Where to show the taxonomy in the admin menu. show_ui must be true. Default: value of show_ui argument ‘false’ – do not display in the admin menu ‘true’ – show as a submenu of associated object types

pre-existing data, and entities

Well the question is do you want to leverage WordPress or do you want to use your custom data. You can build fairly complex things in WordPress even with a plugin like Advanced Custom Fields, make a bunch of custom post types that all have different custom fields(some of which can be other post objects, … Read more

add an option to the read page

There’s no hook in WordPress that allows you to add a third option there. So you need to add a new option at the bottom as described in that post you linked to. Unless you add something using JavaScript, which I don’t recommend. I think that makes more sense anyway. In the latest version of … Read more

Some menu items wont budge

The admin bar is hooked incorrectly.It should be hooked to wp_before_admin_bar_render. This is what I use (and works): function alter_admin_bar() { global $wp_admin_bar; $wp_admin_bar->remove_menu( ‘customize’ ); $wp_admin_bar->remove_menu( ‘ddw-gravityforms-toolbar’ ); $wp_admin_bar->remove_menu( ‘members-new-role’ ); $wp_admin_bar->remove_menu( ‘new-media’ ); $wp_admin_bar->remove_menu( ‘new-post’ ); $wp_admin_bar->remove_menu( ‘new-user’ ); $wp_admin_bar->remove_menu( ‘wp-logo’ ); } add_action( ‘wp_before_admin_bar_render’, ‘alter_admin_bar’ ); Regarding the side menu I don’t … Read more

add submenu page doesn’t display

The fourth parameter in add_submenu_page function is a capability. Try changing it to manage_options so your code looks like this: add_submenu_page(‘tictac_admin_menu’, ‘Sous menu Opening’, ‘Options Opening’, ‘manage_options’, ‘tictac_scripts_menu’, ‘tictac_opening_submenu’ ); Hope it helps

Plugin – Admin menu page broken url

The menu is generated by the function _wp_menu_output. If you look at the place where the links are generated (currently lines 158-162 and 170-174) you see that the admin.php?page= part is omitted under certain circumstances. One of those is an empty $menu_hook. The variable menu_hook is filled by a call to get_plugin_page_hook, which will return … Read more

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