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

9
votes
5answers
7k views

How to remove entire admin menu?

I need to customize the admin panel for my user. So how do I remove the entire admin menu? Not remove the menu item, I mean entirely remove the left vertical menu bar, include the design of the menu ...
1
vote
1answer
15 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() { ...
3
votes
0answers
14 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
2k views

Admin Menu - Highlight top-level menu when on a sub-menu page (without showing sub-menu)

This is the current situation: I am writing a plugin that has a top-level menu page The plugin also contains other sub-menu pages The sub-menu pages are not assigned a parent slug (thus they do not ...
0
votes
2answers
535 views

Add_menu_page() error message -> “You do not have sufficient permissions to access this page”

I'm currently building a website for a friend and have assigned him the user role of editor. I don't want to give him an administrator role in case he breaks the layout. Anyway, I am using ...
0
votes
1answer
17 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
48 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
22 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
2k views

Retrieve and display data from custom db table in admin area?

So, i'm having a bit of an issue with a plugin i'm developing, I wonder if anyone can shed any light on the situation, as many, MANY searches have come back with zero help. :-/ Basically, my plugin ...
0
votes
1answer
27 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
16 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
23 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 ...
0
votes
1answer
627 views

How do I alter the position of a Custom Post Type menu item within my plugin admin menu?

I'm writing a plugin (for the first time, so bear with me!) which includes a custom post type; 'Programmes'. In the admin menu, I've set up a new menu group for the plugin, and I have the 'Programmes' ...
1
vote
1answer
1k views

Howto: Use Custom Post Types as Submenu Items in Admin

In a plugin, i've created 3 Custom Post Types, for example: Dogs Cats Goldfish I've also created a "Pets" Top-level menu page using add_menu_pagewherein I'd like to add the 3 CPTs as submenu ...
1
vote
1answer
41 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 ...
1
vote
2answers
592 views

Admin pages have no content

Not the usual white screen of whatever horror, my site is shown normally until you go to the admin dashboard. While the dashboard (or the admin menu if you will) is visible and responds accordingly, ...
1
vote
2answers
4k views

Show custom taxonomy inside custom menu

I have a custom menu using add_menu_page: add_menu_page('My menu' , 'Some text', 'read', 'nwcm'); Under it, I show a custom post type menu item; // Create the news custom post type ...
0
votes
0answers
20 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
48 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
26 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 ...
3
votes
2answers
2k views

Plugin View Details Link

How do I get the [View details] link to appear on the Plugin admin page in the Description area? The plugin is working fine, the version and authors (with links) show up fine, but no [View details] ...
1
vote
3answers
4k views

How to put placeholder text in the main post input area?

I'm making a course plugin for a university in England. I'm looking to put some default placeholder text in the main post content area, on the admin side. Its the rich text editor I want it to go ...
0
votes
1answer
20 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
31 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", '' ); ...
2
votes
2answers
7k views

Remove Categories / Tags From Admin Menu

I want to remove or hide Categories / Tags submenu under Posts in the Admin Menu. I know this works with the themes submenus: remove_submenu_page( 'themes.php', 'widgets.php' ); The same doesn't ...
0
votes
0answers
38 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', ...
0
votes
0answers
50 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
24 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
2answers
198 views

How to show a gloabl message on a user profile page (in back end)?

I want to show a global message for all users in their profile page. I do not want to edit profile.php what is the hook to do this? Basically I want to add a div to show a paragraph below the ...
0
votes
1answer
72 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
52 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
29 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
22 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 ...
28
votes
4answers
43k views

Changing Admin Menu Labels

I have spent the last day using the functions.php file to fully customize WordPress for my client sites. I am amazed at how much I have been able to accomplish and how much easier it will make things ...
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
42 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 ...
0
votes
0answers
38 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: ...
2
votes
5answers
3k views

Make sub menu items a main link in the admin menu using fuctions.php

I am trying to customize the admin area using the functions.php file to make things easier for my clients. One request I have got before and hope to be able to accomplish, is to move some of the sub ...
0
votes
0answers
43 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
36 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
48 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
1answer
68 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
3answers
91 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
58 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
2answers
2k views

Why I can't change the permalink of this page?

I have the following problem with a permalink: if I open this page (it is implemented as a static page) on my local website: localhost/wordpressAsper/archivio it automatically change it into ...
0
votes
0answers
29 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
37 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
31 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
73 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 ...