Questions tagged [admin]
Users with the ability to perform administrative tasks for a site or a network of sites.
194
questions
346
votes
108
answers
167k
views
Best collection of code for your 'functions.php' file [closed]
As with many others who are now viewing this post, I have been reading various blogs, forums, and discussion groups to learn and improve my WordPress skills. Over the past 12 months I have been on a ...
55
votes
3
answers
83k
views
Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
This answer is very close to what I am looking to do, but instead I would like to specify a specific custom field and display a select menu of its available values. Thanks!
41
votes
1
answer
28k
views
How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
Despite the fact I googled a lot, I've not found the answer to a very simple question :
I have some posts with a custom field (i.e. supplier_name). I would like to be able to search and filter my ...
51
votes
7
answers
103k
views
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() {
...
21
votes
3
answers
15k
views
Adding an Arbitrary Link to the Admin Menu?
Is there a way to add a arbitrary hyperlink to the WordPress admin menu (I mean the menu on the left when you log into the admin dashboard)? For example, can one add a link to Google?
In my ...
39
votes
1
answer
76k
views
Add custom column to Users admin panel
There is default 5 columns named Username Name Email Role Posts in USERS.
Now I want to add one more column with his contact number.
How can I achieve this??
32
votes
6
answers
38k
views
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 ...
27
votes
7
answers
24k
views
Add a Separator to the Admin Menu?
Does anyone know how to add an admin menu separator? I found this but it did not help.
Any ideas?
10
votes
4
answers
11k
views
Showing User's Post Counts by Custom Post Type in the Admin's User List?
I'm trying to figure out how to hook into the /wp-admin/users.php manage page to
create custom columns for showing the number of posts users have for the custom post types on WPHonors.com.
I created ...
3
votes
4
answers
7k
views
Permalinks Question: Adding a prefix ONLY in front of the posts
I want all my posts to have /ARTICLES/%post-name% structure.
But as soon as I modify the custom structure to that, for a reason that beats me, wordpress adds the articles prefix across the board.
...
108
votes
8
answers
77k
views
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 ...
23
votes
3
answers
37k
views
Load a script just to custom post type in admin
I have created a custom post type "portfolio" with something like this :
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => ...
19
votes
8
answers
12k
views
Disable dragging of meta boxes?
Anyone know how to disable this functionality so the meta boxes can't be repositioned?
13
votes
5
answers
33k
views
Filter by custom field in custom post type on admin page
I've used Advanced Custom Fields to create custom fields for Competition name, answers etc. I've made a custom post type for competitions as shown on the image and I used Wordpress functions.php to ...
8
votes
7
answers
12k
views
Add Wordpress MU Network Admin via Database
I am working on getting a copy of a WordPress MU network up and running on my local machine for development purposes (using WordPress 3.2.1 at the moment). I need access to the network administration ...
6
votes
1
answer
4k
views
WP List Table custom quick edit box - post meta data missing and columns change on submit
I have extended class WP_List_Table to create a custom sortable table of posts along with a quick edit box with custom meta boxes.
The meta boxes populate and save but when I click submit the field ...
6
votes
1
answer
4k
views
Custom column for changing post status via ajax
I'm currently trying to implent a new custom column at the page manage screen that will let me change the status (published/pending) of the different pages via an easy toggle link.
From what I've ...
5
votes
1
answer
8k
views
Changing wp login url without .htaccess
How to change wordpress login url without using .htaccess, should be a manual process, so example.com/login will not redirect to example.com/wp-login.php so example.com/login will be the login page?
4
votes
5
answers
7k
views
Adding Custom Field to Taxonomy Input :Panel
I am looking to achieve something which I figured would be fairly simple to accomplish but it seems there are no real examples available to achieve my needs.
Essentially I have a custom post type of "...
3
votes
6
answers
9k
views
Make parent categories not selectable
I'd like to make my categories that have child-categories non-selectable on the post article page.
What I want to do is to remove the checkbox before their label.
I've looked at the filter ...
3
votes
2
answers
3k
views
Add column to pages table
Hey all i am trying to find the section within the edit.php page where it populates the table with all my current pages. What i want to do is add another colum to the table in order to launch a side ...
22
votes
4
answers
13k
views
body_class hook for admin pages
The body_class hook seem only to work with non-admin pages. When I do
add_filter('body_class', 'add_body_classes');
function add_body_classes($classes) {
$classes[] = 'myclass';
...
12
votes
2
answers
26k
views
How to remove a column from the Posts page
In a previous question I asked how to add a column to the Posts page in the Administration section, and got a working answer. But now I need to know how to delete an existing column (e.g. the Date ...
10
votes
4
answers
7k
views
Update post counts (published, draft, unattached) in admin interface
I am working on a multi-user WordPress setup and have made it so a particular type of user can only see and interact with posts, images, pages etc that they have authored. The code to make this happen ...
9
votes
1
answer
2k
views
Change admin language based on user (in single-site)
I'm trying to make a small plugin to install in some sites of a german client.
I can make my way around WordPress in german, but would be easier if it was in english.
There's a plugin that manages ...
7
votes
3
answers
17k
views
How do I load a CSS style into WordPress admin area only?
I'm trying to load a CSS file for my WordPress post area, but having no luck. I have read over the wp_enqueue_style function and came up with the code below, but it doesn't load up. Is there a tag or ...
7
votes
1
answer
9k
views
How to disable Media Library uploads for non-Admin users?
I am working on a clients site, one of the features they want is for his Editors or Authors to only be able to select existing images to insert into Posts from the Media Library.
So looking at the ...
4
votes
1
answer
6k
views
Admin Post Update Redirection to Posts Screen
Is there a hook I can use that when a post is created or updated it goes back to the list/table page of all the posts. If it is also possible to target a post type as well that would be cracking.
It'...
3
votes
2
answers
4k
views
Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress
I've made my own PHP page and used it as a part of my WordPress website. I'm using some WordPress functions and want to have it fully integrated with WordPress itself.
Although I've loaded WordPress,...
3
votes
2
answers
1k
views
Modify CSS via Theme Control Panel
Hi to all I'm trying to create an advanced control panel for my first Wordpress template but I'm not able to add a function that I will need.
The function that I'm trying to add is the possibility to ...
52
votes
7
answers
66k
views
Creating a table in the admin-style?
What is the recommended way of creating a page with a table, in the style of the tables showing posts or users in the admin area?
I am expanding the Cache Images plugin, and it contains a table with ...
29
votes
2
answers
13k
views
wp_verify_nonce vs check_admin_referer
What is the difference, which one should I use?
I know that wp_verify_nonce checks the time limit, and check_admin_referer I think calls wp_verify_nonce as well as checking for an admin url segment, ...
29
votes
4
answers
26k
views
How to determine whether we are in add New page/post/CPT or in edit page/post/CPT in wordpress admin?
This seems like simple thing but I need way to determine whether the current screen is for Add New or Edit ( a sort of wordpress admin conditional tag). Is there a built in function for this already, ...
22
votes
3
answers
53k
views
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 "...
16
votes
7
answers
17k
views
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 ...
12
votes
3
answers
19k
views
How can I speed up my WP admin section?
We have many WP sites with a proxy in between the servers that they sit on and the internet.
Some things in WP simply don't work:
RSS feeds on dashboard
looking up themes
looking up plugins
core ...
11
votes
3
answers
21k
views
Wordpress admin stylesheet
Is there a way to override the styles in the admin in my theme?
I don't want to touch the admin style sheet if I don't have to.
I just want to make a column bigger in my admin, but also, to do it in ...
9
votes
3
answers
10k
views
Sort admin menu items
On a related note to "Changing the Order of Admin Menu Sections?", I'm looking for a way to alphabetically sort the entries in each sub-section of WordPress's admin area.
Currently, whenever a new ...
9
votes
2
answers
6k
views
Remove the "View" Link in Post Admin
I have a custom post type that I'm just using just to keep data in but I sometimes share it with others, and I don't want any confusion when the "view" link appears in the admin column.
Is there a ...
9
votes
3
answers
29k
views
How to remove screen options and help links in the admin area?
I would like to remove screen options and help links in my admin area. How to remove that thing?.
This is what i want to be removed.
Thanks.
8
votes
1
answer
18k
views
display all posts in wordpress admin
Is there any reason why Wordpress restricts the amount of posts you can administer at once to 20?
Is there a way to display all posts?
I want to change the category for about 1800 posts.
I don't ...
7
votes
2
answers
3k
views
Filter translations (gettext strings) on specific admin pages
I'm trying to do a string replacement using gettext filter (source):
function theme_change_comments_label( $translated_text, $untranslated_text, $domain ) {
if( stripos( $untranslated_text, '...
6
votes
2
answers
2k
views
How to disable the "Your site has updated to WordPress x.y.z" admin email?
Using the automatic update of my self-hosted WordPress blogs, I configured automatic updates of both the WordPress core as well as WordPress plugins and themes (through this plugin).
Whenever a core ...
6
votes
2
answers
8k
views
Modify Admin Bar Link
Starting on line 474 of /wp-includes/admin-bar.php there is a function that is declared as the following:
function wp_admin_bar_new_content_menu( $wp_admin_bar )
What it does it generates the + New ...
6
votes
4
answers
29k
views
Plugin to remove Admin menu items based on user role?
I searched high and low for a plugin that can remove/hide Admin menu items , including custom post types and taxonomies, based on user role.
Every one I have tried only does a global hide, not based ...
6
votes
5
answers
7k
views
Add separator to admin submenu
I would like to add a separator to the admin submenu section, NOT in the top level section.
I'm thinking of using javascript and styling to do the job, but I was wondering if there's a more ...
6
votes
2
answers
10k
views
Is There a WordPress Hook to Filter the Edit Posts View?
I want to be able to customize the WordPress edit posts screen to filter based on a custom field (or whatever).
Unfortunately I'm not sure what filter or hook to use here, and instead of opening the ...
5
votes
1
answer
3k
views
Restrict Admin Capabilities in MultiSite
update_core
update_plugins
update_themes
install_plugins
install_themes
delete_themes
edit_plugins
edit_themes
Hi, I want to restrict those capabilities to user_id = 1 so ...
5
votes
1
answer
1k
views
Showing WP_Error message with admin_notice action hook
I have just get an answer to one of my question but the problem is I want to print an error when every user will insert tags of more than two words through post-new.php with admin_notice action hook.
...
5
votes
1
answer
2k
views
Admin config screen without menu
I want to create a sub config from some page on admin panel, eg:
I've set config menu this way:
add_menu_page( 'E+', 'CRE+', 8, 'cr_e_plus_user_config', 'cr_e_plus_user_config');
add_submenu_page( '...