Articles of admin

How to show custom field's value under post/page title in wp-admin

I’m trying to add the value of a custom field under the post/page title in wp-admin list of posts/pages (much like excerpt mode in posts list) without hooking into the columns process since other plugins are already doing that and it looks like each cancels the other. Here’s a screenshot of what I’m trying to […]

How to Remove the “Restore” Link in Quick Edit?

I want to know is there any hook to remove the Restore link in the edit page – trash page? /wp-admin/edit.php?post_status=trash I know I can hide it with a css/jquery trick, but I prefer to use a hook for this.

Why is this Ajax not working?

I’m not sure if I am abusing WordPress and Ajax by doing it this way but WP and Ajax Codex a well as Plugin Development with Ajax do not seem to be very helpful. I have created the following Ajax situation: (function($){ $(document).ready(function(){ $(‘a’).click(function(e){ var el = $(this).prev(‘input[type=”checkbox”]’); if(el.is(‘:checked’)){ el.prop(‘checked’,false); } $.ajax({ url : “<?php […]

Collapse subcategories in post edit screen

Is there a plugin to collapse/expand subcategories in the post edit screen? In other words, I’m looking for analog of CMS Tree Page View plugin, but for categories.

Can I remove the Rich Text box editor for a specific post?

A few months ago I asked a similar question: Is it possible to remove the main rich Text box editor? and got the following answer: function remove_pages_editor(){ remove_post_type_support( ‘page’, ‘editor’ ); } add_action( ‘init’, ‘remove_pages_editor’ ); This code removes the editor from all pages. Can I remove if from specific pages (by post-ID) somehow? Thanks!

Reorder plugin items in the admin menu

Is it possible to reorder plugin menu items and custom admin items in the Admin menu without modifying the position in the plugin itself? I’ve tried using the method described here “Changing the Menu Order”, but when you add a page link like admin.php?page=pluginname, it doesn’t do anything. Guessing because it can’t overwrite the position […]

Page only shows when user is logged in (even with visibility set to public)

I’m trying to troubleshoot an issue on a client’s site. There is one specific page which appears as “not found” unless you log in and then visit the front end, in which case it appears normally. The visibility on the page is set to public, and in every other way it’s a normal boring wordpress […]

current_user_can('Administrator') does not return true in multisite if user is Administrator but NOT Super Admin

I have a multisite WordPress installation set up, and have a user who is set to an ‘Administrator’ role on both sites. However, the function current_user_can(‘Administrator’) does not return true when logged in as them, which I expected it to. My user account, however, is an ‘Administrator’ on both sites, and also a ‘Super Admin’ […]

Actions that Run on Admin Edit Page Load After Posts Are Queried

What actions run on the edit page in the admin section of a post type? i.e. xyz.com/wp-admin/edit.php or xyz.com/wp-admin/edit.php?post_type=shop_order (custom post type) I need to run a function when the page loads, after the query has performed to get all of the posts that will be displayed on the edit page. What action should I […]

Link to post author but exclude administrator (on single.php)

How to exclude administrators from the code below? So if the current post author has the role of administrator, nothing will show. <a href=”<?php echo get_author_posts_url( get_the_author_meta( ‘ID’ ) ); ?>” ><?php the_author_meta( ‘display_name’ ); ?></a> thank you