Questions tagged [wp-admin]

Tools for site administration located in the `wp-admin` directory of a WordPress site.

Filter by
Sorted by
Tagged with
139 votes
17 answers

Adding a Taxonomy Filter to Admin List for a Custom Post Type?

I have created a Custom Post Type called 'listing' and added a Custom Taxonomy called 'businesses'. I would like to add a dropdown list of Businesses to the admin list for the Listings. Here is what ...
Taras Mankovski's user avatar
109 votes
8 answers

Organizing Code in your WordPress Theme's functions.php File?

The more customization I make to WordPress the more I start thinking about if I should be organizing this file or splitting it up. More specifically, if I have a bunch of custom functions which only ...'s user avatar
103 votes
7 answers

How to check if a user is in a specific role?

I have a pretty specific requirement to show different text in a field label on the user profile page based on the current user's role. I can't seem to figure out how to check whether the current use ...
jessegavin's user avatar
  • 3,446
77 votes
13 answers

Can I rename the wp-admin folder?

Is it possible to rename the wp-admin folder? I know I could just rename it, but unless it's supported by the code lots of things would break. If I use a custom folder name, it will make it slightly ...
Adam Dempsey's user avatar
  • 1,050
72 votes
9 answers

How do I Enqueue styles/scripts on Certain /wp-admin Pages?

I have two simple functions that load stuff using wp_enqueue_style() and wp_enqueue_script(), something like these: function admin_custom_css() { wp_enqueue_style( 'stylesheet_name', 'stylesheet.css')...
Wordpressor's user avatar
  • 5,041
67 votes
2 answers

How can I add an image upload field directly to a custom write panel?

I've added a new page under "Pages" in the wordpress admin, and added several custom fields. I'd also like to be able to add an upload image field to the page editor - is there some way to do this via ...
Will's user avatar
  • 893
59 votes
6 answers

Adding custom columns to custom post types

I've done this previously but I've forgotten the name of the hook, and can't find it anywhere... What I'm trying to do is add some custom columns in the listing of a custom post type in the admin. ...
Chin Leung's user avatar
57 votes
6 answers

What are the standard admin CSS id/class tags?

Is there a list of WordPress CSS id/classes that I can use to build plugin option screens that look and feel more like a normal WordPress option page? I have found some through serendipity but it ...
Ole Henrik Skogstrøm's user avatar
52 votes
7 answers

How to remove admin menu pages inserted by plugins?

I've got the following code, which cleans up a lot of stuff that is not going to be used within the admin area: add_action( 'admin_menu', 'my_remove_menu_pages' ); function my_remove_menu_pages() { ...
tmyie's user avatar
  • 863
50 votes
6 answers

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 ...
Adam's user avatar
  • 565
41 votes
3 answers

adding custom stylesheet to wp-admin

im having troubles getting my custom stylesheet work on WP-ADMIN area. plugins_url('style.css', __FILE__) ); do i have to create folder in my plugins named css or do i just copy my .css to the wp-...
user1933824's user avatar
37 votes
7 answers

Adding Fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?

The question is "How do I add one or more fields to the Category, Tag and Custom Taxonomy Edit Screen in the WordPress Admin?" This question was asked on the wp-hackers list August 1st 2010 and I ...
MikeSchinkel's user avatar
  • 37.5k
36 votes
9 answers

Can't change language (only "English (United States)")

Wordpress should always allow me to change the language, anytime. However, sometimes I get stuck in these kind of situations, where I only get to choose "English (United States)". (Settings > General ...
Fabián's user avatar
  • 461
34 votes
6 answers

Is there ANY way to remove comments function and section totally?

I don't want any comment querys to run. I don't wont anything about comments to be shown in wordpress admin area. Is this possible in any way? EDIT: Remove all links to the comments from admin bar, ...
Peter Westerlund's user avatar
32 votes
1 answer

Is it possible to reuse Modal for dialogs other than media

To expand: I'd like to utilize the same Modal code/appearance ( as used in, ) to open a modal of my own custom dialog, not the Media Editor. In the past, I've ...
Jer's user avatar
  • 481
31 votes
6 answers

Changing the Order of Admin Menu Sections?

I am getting a bit frustrated over here after having spent a few hours trying to accomplish this fairly simple task without any luck. Essentially I have 5 custom post types which I created and all I ...
Binarybit's user avatar
  • 413
30 votes
1 answer

How to use "menu_order" field for posts?

I have a special case where I'd like to order posts in a custom order and it would be great to use the "menu_order" field that is normally only used for pages. What would be the best way to expose ...
tooshel's user avatar
  • 1,427
30 votes
3 answers

What's the easiest way to stop WP from ever logging me out

After a certain amount of time WP logs out all users and forces them to log back in again. For development environments on my local machine this is obnoxious and absolutely unnecessary. Is there an ...
jerclarke's user avatar
  • 3,043
29 votes
6 answers

"Too many redirects" ONLY when trying to access wp-admin page

I figured I would ask my own question seeing as the duplicate question(s) still haven't been answered. For some reason after my fresh install of Wordpress 4.9.1 on my Ubuntu VPS, enabling my "...
Matt's user avatar
  • 971
29 votes
5 answers

How to add an admin notice upon post save/update

I have a post type the uses post_save to take the address from the post-meta and retrieve the lat/lng coordinates from the Google API. I need a way of notifying the user if there was an issue with ...
Jason's user avatar
  • 403
26 votes
3 answers

How do i best handle custom plugin page actions?

I'm constantly running into the same annoyance, so i thought i'd see if there's any ideas or experience out there... I've created a plugin that uses it's own admin page. It has to. Now that i sorted ...
wyrfel's user avatar
  • 3,075
25 votes
10 answers

Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?

I just figured out the menu_position parameter it seems like you can place the menu of your custom post type almost everywhere. Except above the Posts menu! How can I accomplish that?
wyc's user avatar
  • 3,867
24 votes
7 answers

Change the text on the Publish button

Is there a way to change the text of the publish button on a custom post type to say some different? For example, Save instead of Publish. And also remove the draft button?
Paul Sheldrake's user avatar
22 votes
3 answers

Admin Page Redirect

Is it possible to redirect users to an admin page if they access another admin page? For example if they a user ever hits "all pages" /wp-admin/edit.php?post_type=page they would get redirected to "...
Shae's user avatar
  • 731
21 votes
2 answers

Modal window from within Wordpress admin

How can get a modal window to work from within the wordpress admin? I want to create a modal window that will work from a meta box within the wp-admin. Any ideas?
Shae's user avatar
  • 731
20 votes
8 answers

How to restrict dashboard access to Admins only?

How would we restrict access to the WP admin area to all users except admins? The users on our site have their own profile pages which do all the functions they need. So admin should be off limits to ...
Robin I Knight's user avatar
20 votes
8 answers

Disable dragging of meta boxes?

Anyone know how to disable this functionality so the meta boxes can't be repositioned?
fxfuture's user avatar
  • 1,337
20 votes
1 answer

Setting $_SERVER['HTTPS']='on' prevents access to wp-admin

First off my server is sitting behind a load balancer. My SSL certificate sits on the load balancer and handles HTTPS. The data coming in on port 443 is forwarded to the Wordpress server using HTTP ...
nu everest's user avatar
20 votes
19 answers

Unable to login and wp-login.php redirects to wp-admin%2F&reauth=1?

I am having some difficulty logging into my WordPress site. When I attempt to visit, I see a blank page and the url bar changes to:
user44754's user avatar
  • 221
20 votes
1 answer

Row actions for custom post types?

I'm working on a plugin, which converts a site into a feedback sort of portal. I made a new object page, 'Feedbacks', which displays all the feedbacks is a tabular format, and I'm using ...
Rutwick Gangurde's user avatar
18 votes
5 answers

When moving a WP site, why does wp-admin redirect to old site?

I am in the process of moving a WP site from one host to another. I copied the database and all the files, created a new database and imported the old one. I then changed the wp-config file. The home ...
forrest's user avatar
  • 483
18 votes
2 answers

Toggle admin metabox based upon chosen page template

I'd like to have a custom field interface show up only when a certain template is assigned to a particular WordPress page. Any ideas?
Jonathan Wold's user avatar
17 votes
2 answers

I found this in a plugin. What does it do? is it dangerous?

I found this in a plugin. What does it do? is it dangerous? add_action('admin_enqueue_scripts', 'pw_load_scripts'); if (!function_exists('wp__head'){ function wp__head() { if(function_exists('...
Sofia Rose's user avatar
16 votes
4 answers

How can I control the position in the admin menu of items added by plugins?

Having read elsewhere on Stack of two WP plugins forcing identical menu positions (with the likelihood of one then not appearing), I'm wondering how I can control the position of menu items added by ...
glvr's user avatar
  • 881
16 votes
9 answers

Adding fields to the "Add New User" screen in the dashboard

I'd like to add the field "Company Name" to the add new user page in the admin panel. I've done quite a bit of searching and have been unable to find details on how to do this. I can easily add info ...
Zach Shallbetter's user avatar
16 votes
7 answers

Loading External Scripts in Admin but ONLY for a Specific Post Type?

So I continue to run into this issue and I just looking for the best and simplest solution to solve this problem. I have come to make use of custom post types in many different projects and have ...'s user avatar
16 votes
4 answers

How to disable the "Post Lock/Edit Lock"?

I want to disable this just for one Post Type, as it doesn't really matters if there's another user editing it (the main content editing area is Ajaxified and non-admins can only see that). I looked ...
brasofilo's user avatar
  • 22.1k
15 votes
3 answers

adding the category to the admin column for a custom post type?

I have built a custom post type called article and the information given on the admin summary screen is sparse. I was able to add the featured image post thumbnail image using the http://codex....
Jonathan Beech's user avatar
15 votes
4 answers

Change page title in admin area

Is there someway to change the title in wp-admin? Been looking all over google but no one seem to mention it. I simply want to get rid of "— WordPress" and possibly change the "‹" into ...
INT's user avatar
  • 1,281
15 votes
5 answers

How can we make managing lots of pages in WordPress Admin better?

WordPress obviously comes from a blogging background but can be used to serve sites with a lot of Pages. However, where it falls short for me is not in regard to performance but in the Admin area's ...
Rick Curran's user avatar
  • 1,076
15 votes
4 answers

Register CPTs using Dashicons for admin menu icon in WP 3.8

WordPress 3.8 introduced in core the plugin MP6 that among other things use an iconic font called Dashicons to display fonts in the dashboard. Now, is well know that register_post_type has an ...
gmazzap's user avatar
  • 46.1k
15 votes
2 answers

do_shortcode() within Admin Page

I'm using a few plugins that have shortcodes ... however, instead of creating a public page for the content, I've created some new pages within the admin using add_menu_page and I need to know how to ...
dcolumbus's user avatar
  • 637
14 votes
5 answers

How to search all user meta from users.php in the admin

The search form at the top of the users listing in the Admin area (wp-admin/users.php) is limited and does not search all of the user meta fields, such as bio, instant messenger handles, etc. I've not ...
John Chandler's user avatar
13 votes
1 answer

Changing the 'wp-admin' URL to whatever I want

Is there a plugin that allows me to change the url of to ? Curious if there is an easy solution to this by now.
Zach Smith's user avatar
12 votes
5 answers

How can I remove the "Add New" button in my custom post type?

I have many custom post types that need the Add [custom post type] feature but I have a custom post type of "About" and I do not need to "Add New" about to the about custom post type. So I want to ...
Lucas Santos's user avatar
12 votes
1 answer

Link to specific Customizer section

I've got a site with a few extra Customizer sections. Is there a way to link directly to these so that section open when the page loads? Something like
frogg3862's user avatar
  • 430
12 votes
2 answers

How to remove the core embed blocks in WordPress 5.6?

Following up on this question, I want to remove some of the default (core) embed blocks in the WordPress block editor. As of WordPress 5.6, the blocks are no longer available under the core-embed/* ...
Sven's user avatar
  • 3,624
12 votes
7 answers

How to filter users on admin users page by custom meta field?

The Problem WP appears to remove the value of my query variable before it gets used to filter the list of users. My Code This function adds a custom column to my Users table on /wp-admin/users.php: ...
morphatic's user avatar
  • 391
12 votes
1 answer

Disable /wp-admin/plugin-install.php

How can I disable plugin upload and installation via Wordpress Admin? Should still be able to activate/deactivate plugins in admin.
leepowers's user avatar
  • 392
11 votes
2 answers

Set Default Admin Colour For All Users

I am surprised with the new colour scheme for 3.8 and although the classic 3.7 theme has gone, I would like to set the new "Light" colour scheme as the default for all users, but at the same time, ...
SolaceBeforeDawn's user avatar

2 3 4 5