Usually, plugin and theme authors need to provide access to a settings (options) screen so users can customize how the plugin or theme is used. The best way to present the user with such a screen is to create an administration menu item that allows the user to access that settings screen from all ...

learn more… | top users | synonyms

0
votes
2answers
14 views

Output the admin menu_position for each item

Is there a function I can use which will temporarily output the menu_position of every item in the admin menu? While trying to reorganise the admin menu, the single largest thing slowing me down is ...
0
votes
0answers
7 views

Change the highlighted Admin Menu Page?

I want to add a shortcut for editting a Page to the admin menu sidebar. Let's say the name is "Home" and its Page ID is 10: add_menu_page( "Home", "Home", "manage_options", ...
1
vote
2answers
36 views

Declaring <?php ?> in variables

I need to put the PHP <?php global $' . $icon_var . '; echo $' . $icon_var . '; ?> inside the variable of a custom menu structure, but it gets commented: <a ...
0
votes
0answers
29 views

Admin panel specific page only with admin_head for 4.1?

<?php /* Plugin Name: Header Problem Demo Plugin URI: http://wordpress.stackexchange.com/questions/215190 Description: Shows how old admin_head-{page} method no longer works Version: 1.0 Author: ...
0
votes
0answers
14 views

Custom post type - hide submenu and use only one post?

I'm using register_post_type to create a menu item called "Annonsering" in the Admin panel, with the following code in functions.php for it: register_post_type( 'annonsering', array( ...
0
votes
1answer
30 views

Separating a custom taxonomy from blog post-type

Whenever I invoke register_taxonomy in my site's custom plugin, all taxonomies are created as children of the blog post-type in WordPress by default. I just want them to be top-level items in ...
4
votes
1answer
43 views

Is there a way to keep a custom menu expanded when editing a custom post type?

I am building a plugin that has a custom menu with pages under that menu. A few of those pages are custom post types. I would like to have the main menu stay open when I am on one of those custom post ...
0
votes
3answers
42 views

jQuery datepicker not showing on admin menu

Nothing happens when I select the datepicker field. This is the code for the field: <input id="sticky_date" name="sticky_date" class="datepicker hasDatepicker" type="text"> The javascript ...
1
vote
1answer
26 views

Show media-frame-menu on custom Media Frame

I have a plugin I built that adds a custom media frame with the following: media_frame = wp.media.frames.media_frame = wp.media({ title: 'Select your images', button: { text: 'Use Image' }, ...
0
votes
1answer
37 views

Duplicate “Pages” Item in Admin Menu

I'm registering the following post type: register_post_type( 'post', array( 'hierarchical' => true, 'public' => true ) ); Now I have duplicate "Pages" menu items in WordPress ...
0
votes
0answers
23 views

1 Custom Post Type not appearing in admin

I am facing an issue. I've created a function for custom post types. This is my code. function my_cpt(){ $labels = array( 'name' => 'SM & Points Templates', 'add_new' => ...
1
vote
1answer
23 views

How to remove menu installed in wp-admin by a theme?

I installed Placester theme.And then disabled it, and deleted it. But there is still a menu there. How can I remove it? The only installed plugins are: Akismet Contact Form 7 Google Analytics by ...
0
votes
1answer
15 views

Plugin option for input box validation

I'm crating a plugin option page from the code below. However, it does not explain how to get validation on the input fields. How do I get validation on id_number for NUMBER ONLY? ...
0
votes
0answers
27 views

Pagination in plugin's backend

I am displaying a list of posts in the plugin backend but I can't seem to get the pagination to work. I used the standard approach of getting the "paged" variable and then passing it to get_posts()'s ...
0
votes
1answer
40 views

How can I move Customizer menu item to first level in WP Dashboard?

How can I move Customize menu item from Appearance menu to first level menu items in WordPress dashboard so it would be below Appareance menu? Also how can I change the name Customize?
1
vote
1answer
16 views

reorder plugin menu position

Looking for a function that I can use to reorder the admin position of a 3rd party plugin, and that will still work once said plugin gets updated. Backstory AIO webmaster and All In One Events ...
0
votes
1answer
31 views

Admin custom option screen not saved unless user manage_options capability

I am running into exactly the problem described by this Trac: https://core.trac.wordpress.org/ticket/14365 I see that one of the devs added a Diff here: ...
0
votes
0answers
43 views

How to add a class to wp-admin custom sub menu item?

I was given the following code snippet: <?php add_action( 'admin_init','acme_custom_menu_class' ); /** * Iterates through the menu items in the dashboard and then applies a custom class * ...
0
votes
1answer
119 views

How to add attributes to WordPress Admin Sub Menu List Items

I have been trying to find a way to add a class or an id to my custom administration sub menu. I only see a class on the first menu item. I would either like to add a css class or an ID on my sub menu ...
2
votes
1answer
34 views

how to only add a top-level admin menu without it creating a sub-level-menu

Here is a the code snippet: add_action( 'admin_menu', 'travel_site' ); function travel_site(){ add_menu_page( 'Travel Site Menu', 'Travel Site', 'manage_options', 'travel-site-menu', ...
0
votes
1answer
24 views

How do I disable certain menu in editor user administrator page

How do I disable the media, pages, comments, profile and tools in editor user administrator page?
0
votes
0answers
18 views

Add custom option to admin menu wordpress

I need to create a new option in my wordpress admin menu, I know I can create this using add_menu_page() but what I specifically need is an option to 'Add Property', which has similar options in there ...
0
votes
2answers
90 views

Show Wordpress Plugin Menu(Admin) To Editor

I am an Admin of wordpress website and I have created one user with Editor role, I have installed one plugin Pretty Link(https://wordpress.org/plugins/pretty-link/) this plugin shows its menu on Admin ...
2
votes
2answers
71 views

How do I remove the entire left nav bar in admin for certain level users?

I know how to remove items from the left nav bar (hook into admin_menu and do global $menu; unset( $menu[ __( "Posts" ) ] ); for example). But it still shows a left nav bar (with nothing on it). I ...
0
votes
1answer
215 views

$wp_customize->remove_section for customizer setting?

I use an underscores theme and try to remove the nav menu without any result : $wp_customize->remove_section('colors'); // works $wp_customize->remove_section('background_image'); // ok ...
0
votes
0answers
44 views

How to add class or id to menu item added with add_theme_page()

I added a menu item to the Appearance menu in the admin area using add_theme_page(). Is there a way to add a class or id to it so I can style it? I just want to change the font color a little, but I ...
1
vote
1answer
69 views

How to send little data between admin pages of my plugin?

I have a plugin that creates two pages in admin menu: /wp-admin/admin.php?page=list-records /wp-admin/admin.php?page=add-edit-record I'm regularly using add-edit-record to to create some sort of ...
0
votes
0answers
17 views

Get admin bar search fierld into the front-end

In a regular Wordpress installation, in the admin bar in the top, there's a search button. Can I somehow use this button/bar in the frontpage, and how so? Thanks in advance : )
0
votes
0answers
20 views

Strange problem with overlapping / disappearing Text in the admin backend in WP 4.3 [duplicate]

I experience a very strange issue with all Wordpress installations I'm in charge of. Text in the backend in the left hand menu overlaps. Reloading without cache makes it disappear for some time. When ...
0
votes
1answer
36 views

Admin: sub menu doesnt display under apperance when activate my themes

I got a strange issue in WordPress. I build a themes for WordPress. when I activate my theme, some sub-menu under appearance in admin panel where missing. If I activate another themes it works ...
0
votes
1answer
35 views

Disordered sidebar in admin panel of self-hosted blog network [duplicate]

This is how my self-hosted blog network's sidebar started to look, starting from yesterday: Can someone tell me, what is going on or what am I missing? Tested on Chrome on two different computers ...
0
votes
1answer
87 views

Redirection to external site on admin

I have a menu on Admin which opens a page in admin. The issue is that when I open that menu it redirect to another site like www.abc.com, the admin menu includes DB connection and it list the product ...
2
votes
1answer
85 views

Adding an admin page - OOP approach not working

I have a parent class, which contains the following: use app\My_Dashboard; class My_Class { public function __construct() { add_action('admin_menu', array($this, ...
1
vote
2answers
725 views

How to remove Customize from admin menu bar after WP 4.3

WordPress 4.3 brought more updates to the customizer. It also added a new option at the top admin menu bar that says 'Cusomize' and has a paintbrush. How can I disable this menu from showing up? We ...
4
votes
2answers
2k views

Admin sidebar items overlapping in admin panel

Before to report this to wordpress I would like to know if it's just me or it's actually a bug. I noticed also another user that asked on the wordpress forum but he hadn't an answer for that: ...
0
votes
0answers
23 views

How to check an admin submenu already exists?

To check if a menu exists, I use this: if ( isset ( $GLOBALS['admin_page_hooks']['menu-slug'] ) ){} But it doesn't work with submenus. How can I do the same for submenus then? Thank you. EDIT: ...
0
votes
0answers
17 views

Numeric values associated to admin menu bar

I'm customizing my admin left hand menu and am having an issue coming up with some of the numbers. I've even gone through the option of counting as I save out my code to confirm their sorting order ...
0
votes
1answer
98 views

Adding direct link to post editor in admin menu

I'm trying to make a shortcut in navigation that will take user to one certain post. So far I'm using add_action('admin_menu', 'add_custom_menu_position'); function add_custom_menu_position() { ...
0
votes
0answers
15 views

How to get the Latest Menu Options to be displayed in Wordpress Custom Menu

I have donated about 5 plugins to Wordpress. Now my requirement is to show the updated Sub-Menus options (in admin panel) by checking all plugins (by selecting the latest version of the five plugins). ...
0
votes
0answers
34 views

Creating menu not working with OOP Plugin

I am trying to create a test plugin to practice my OOP with WordPress, I am trying to simple add a menu item into the WordPress admin section. When I activate the plugin it should add the menu item ...
0
votes
0answers
14 views

Ensure widget admin js fires in Widgets and Customizer

Doing a long-overdue update of a plugin. I have some JS that loads in the admin side to react when a user changes a select value in the widget options. $('#accordion-panel-widgets, ...
0
votes
0answers
140 views

Dislay Admin Notifications through Ajax

I am writing a plugin that will require its own settings page in the WordPress admin menu settings section. I have done most of it correctly, and I am stuck at one point. I understand that in order ...
2
votes
1answer
187 views

Admin page menu keeps bugging out

I've been having a problem with my WordPress installation on my Debian LEMP VPS. On the WordPress admin page (example.com/wp-admin/index.php) all the items on the left menu bar keep displacing ...
0
votes
0answers
83 views

How to give Editors ability to edit menus but restrict full access to other Appearance menu items?

I typically set clients up as Editors on their site so they can focus on what is most important to them - editing pages and posts. I find however that this removes the Appearance menu and then the ...
0
votes
0answers
28 views

Modifying WooCommerce Admin Menu causes Error in Media Upload

I'm trying to modify the WP-Admin menu for ease of use. I'm using standard code-based modifications utilizing the global $menu variable. global $menu; if( class_exists( 'woocommerce' ) ){ /* This ...
0
votes
0answers
67 views

wp_is_mobile() inside js

I've stumbled upon a issue that i can't fix. I've implemented a autocollapse menu ..all works fine UNTILL i go to mobile version where the wp core's menu bugs out with my menu js code. Basicly i ...
0
votes
1answer
40 views

Renaming post to something else, breaks dashboard if edit_posts is false

I've been changing the name of the "Posts" to something else with the following code: // Change menu labels function xxx_admin_menus() { global $menu; global $submenu; $menu[5][0] = ...
0
votes
0answers
45 views

Dynamic admin submenu

I'm creating a plugin for WordPress with dynamic sub-menu's fetched from the server. Putting the dynamic loading of sub-menu's into the menu_setup() hook function would slow down other WordPress ...
2
votes
0answers
150 views

Custom Post Type Settings page, choose page to display archive

So, I followed the accepted answer of this post Possible to add another setting to 'Front page displays' setting for Custom Post Type but didn't entirely work, had to compare against the ...
0
votes
0answers
26 views

How to link other page?

I build menu in admin name is "Members". This is code file User.php <?php function User_add_menu(){ add_menu_page( 'User Members', 'Members', 'manage_options', 'user-members', ...