How do you add a settings page to another menu?

You’d need to create the top-level menu page, and then the sub-menu after that. Here’s an example: function my_menu() { add_menu_page ( ‘MVC Events’, // $page_title ‘MVC Events’, // $menu_title ‘manage_options’, // $capability ‘mvc-events’, // $menu_slug ‘mvc-options’ // $function ); add_submenu_page ( ‘mvc-events’, // $parent_slug ‘ATB Event Options’, // $page_title ‘ATB Event Options’, // $menu_title … Read more

Admin Menu new tab external link

That menu is rendered by a function called _wp_menu_output in menu-header.php and I don’t see a hook that will let you alter the HTML for those links, which is what you’d need to do– ie. <a target=”_blank” … That being as it is you will probably need to do this with Javascript either by rewriting … Read more

Remove submenu item from list

Use the API functions remove_menu_page and remove_submenu_page to remove menu items rather than manipulating global variables. This will remove the themes page under appearance: function wpa_remove_themes_submenu() { remove_submenu_page( ‘themes.php’, ‘themes.php’ ); } add_action( ‘admin_menu’, ‘wpa_remove_themes_submenu’, 999 );

How to put custom admin setting field into a shortcode

Your issues aren’t shortcode-related, just some PHP syntax problems. I suggest enabling debugging so you can see PHP errors being generated. Opening <?php and closing ?> php tags are for switching between html and php output. See escaping from html in PHP documentation. A function can only return once, as it immediately ends execution and … Read more

How can I reorder admin bar items?

This is an old question, but for others in the future the answer is. You can add the following code to functions.php. function reorder_admin_bar() { global $wp_admin_bar; // The desired order of identifiers (items) $IDs_sequence = array( ‘wp-logo’, ‘site-name’, ‘new-content’, ‘edit’ ); // Get an array of all the toolbar items on the current // … Read more

How do I add an item to the WP admin menu?

You could do it with something like this in theme functions.php (at end) add_action(‘admin_menu’, ‘news_admin_test’); function news_admin_test() { add_menu_page( ‘News Page Title’, ‘News Option’, ‘manage_options’, ‘newspage’, ‘show_menu_news’, get_home_url() .’/wp-content/themes/my_theme/assets/img/logo.png’ ); } function show_menu_news () { echo ‘News content’; }

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