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
10 views

Remove query var on admin pages when 'Save changes' pressed

In the admin backend we use a query arg that is left in the URL and keeps getting used whether it is supposed to or not. Our plugin has an array with values that can be toggled via the custom backend ...
1
vote
2answers
27 views

How to change admin menu position of “Media”?

I would like to change the priority/menu order of the "Media" admin page. Is there a way to change that via apply_filter? Is there a way to change only "Media" page priority without having to list ...
0
votes
0answers
22 views

Why add_menu_page adds admin.php and how to remove it?

I'm trying to add custom menu items for my Custom Post Type. I've added "show_in_menu" => false in my CPT definition so it will not show in admin menu. Then I've added to admin_menu action: ...
0
votes
0answers
9 views

Add submenu page error

Help. What am i missing ? The first submenu is ok, but the second redirects on click to site.com/wp-admin/<slug> Code: add_action('admin_menu','RegisterPages'); function RegisterPages(){ ...
0
votes
0answers
27 views

Reorder WordPress Admin Menu - Ignore Plugin Menu Position

I've been working on reordering my admin menu, but I need some help, Currently, I have a plugin active on my site called Clientside, it's a WordPress admin dashboard theme. My issue is that the view ...
0
votes
0answers
24 views

Issue with search form admin panel after PHP migration

I have website hosted on OVH, and currently I am using PHP v. 5.3. Since OVH will stop supporting it soon I have to migrate to 5.4, 5.5, 5.6 or 7. I've tried 5.6 and 7 but what happens is that ...
4
votes
0answers
34 views

Admin settings update updating every time home page is hit?

I have created a plugin that sends an email with all orders placed that day by X o'clock to email Y. I followed the tutorial here: https://scotch.io/tutorials/how-to-build-a-wordpress-plugin-part-1 ...
1
vote
1answer
33 views

Add menu page on multisite

I'm trying add menu page in multisite (settings will be global for all blogs). Current code created in plugin and activated in network function wpdocs_register_my_custom_menu_page() { ...
0
votes
1answer
32 views

Disable Auto-Expanding Menu in Wordpress Admin Menus

Right now, when I click on a menu item in the wordpress admin menu, the section that that page belongs to is automatically expanded. For instance, if I click on a link in the Settings section then ...
2
votes
1answer
104 views

How to Add a Third Level Sub Menu to the Wordpress Admin Menu

Is there a function, action or filter that I can use to add a third level dropdown menu to the wordpress admin menu. For instance, right now in the sidebar menu their is a menu for posts and under ...
1
vote
1answer
26 views

Admin page repeatable fields

I have a submenu page set up and I want to add repeatable fields to it. The submenu page is to add staff holidays (fields will be Start Date, End Date and a multi select to pick the staff members ...
0
votes
1answer
35 views

How put the correct URL to sub-menu plugin?

I'm trying to build my first plugin and building my plugin menu like this: function group_panel(){ include('html/example.html'); echo "<h1>{$_POST['data']}"; } function ...
0
votes
1answer
21 views

Change users.php WP_User_Query

A client has requested to have two kinds of custom user roles, and have those users displayed in an Admin Menu Page of its own. So far, I've achieved that using WP_List_Table with success. Now, the ...
0
votes
0answers
47 views

PHP Fatal error: Cannot redeclare options_general_add_js()

Just updated to wordpress 4.5.2, I'm getting that error when loading the wp-admin/options-general.php page. Here is the stack trace mod_fcgid: stderr: PHP Fatal error: Cannot redeclare ...
1
vote
1answer
42 views

Suggestions on Approach to New Plugin I'm Stuck On

I'm a newbie plugin developer, and I've had an idea for what I though would be a simple to build debut plugin, but I seem to have reached a brick wall with it and wonder if anyone can suggest some ...
0
votes
0answers
26 views

Custom Post Type - multiple in single menu position

I currently have a couple of 'Custom posts types'. Currently, each of them has a separate item on the menu but I would like to add them all as sub for one position. I have somethink like this: Movies ...
0
votes
0answers
11 views

How to add a column to publish a post for the Posts page of Administration section?

I know that how to add a column to post page of administration section and display something like a custom filed. But now I want to add a publish button if the post status is draft. How to add it?
0
votes
2answers
54 views

Show custom taxonomy not in submenu

I have one small problem and I can't find answer...I have created custom post type and custom taxonomy, but my custom taxonomy is showing as sub menu under custom pos type, here is example what I ...
0
votes
0answers
38 views

add a custom user role and assign specific admin menu pages

There is wordpress function add_role to add a custom user role by adding wordpress defined capabilities like read, edit_posts, delete_posts, etc But I want to create a custom user role and assign ...
0
votes
1answer
26 views

in_array function Problem

Im writing a custom plugin, which will do different stuff for specific admin usernames. So admin will be able to choose couple admin usernames in plugin settings page in backend via repeateable text ...
0
votes
0answers
35 views

Can Someone Explain What These Three Lines Do?

I found this in a plugin (not a public plugin) $code_pages = array('offers.php'); foreach($code_pages as $code_page) { $hookname = get_plugin_page_hookname("xxx/$code_page", '' ); ...
0
votes
0answers
64 views

Create sub_menu_page in plugin without showing in menu

I've just working on some plugin on our project and I want to do 3 steps form of adding some data. I've got function init_e_menu(){ add_menu_page( 'Form', 'Form', 'manage_options', 'e-form', 'e-...
0
votes
0answers
75 views

500 internal server error on wp-admin only

I am getting a 500 internal server error when I try to log into www.mysite.com/wp-admin/ and www.mysite.com/wp-login.php. The actual site is up and running just fine so it cannot be a database ...
0
votes
1answer
25 views

Margin problem on management menu?

I'm developing a Wordpress site (www.costactiva.com). It's a multilingual site with around 15 languages at the end. I found this 'mistake?' in the Menus area: When I have more languages than they ...
0
votes
1answer
93 views

How to get specific page screen ID

Is it possible to get the screen id of a specific page? I've search on google and couldn't find anything related to specific page screen ID I'm not looking for the get_current_screen() ID or the ...
0
votes
1answer
73 views

Developing a plugin where users can edit entries saved in database

it's the first time I'm writing a plugin. So far, it creates a table in database on activation, users can add entries to database and they can check saved entries. I've added Edit and Delete links ...
0
votes
2answers
35 views

Adding admin top-level menus

I am writing a plugin (Github Link) and have trouble setting up the titles of the admin menu. I defined a top header menu with add_menu_page (link to code, same as below) and 2 children with ...
0
votes
2answers
27 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
8 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", post.php?post=10&...
1
vote
2answers
46 views

Declaring <?php ?> in variables [closed]

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 href="http://slembas.esy.es/">...
0
votes
0answers
40 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
65 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
38 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
51 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
111 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
74 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
80 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
33 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
46 views

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

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
35 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? https://codex....
0
votes
0answers
84 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
68 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
22 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
40 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: https://core.trac.wordpress.org/attachment/...
0
votes
0answers
124 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
164 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
48 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
30 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
22 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
182 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 ...