Articles of admin

How do I check if the user is a site owner in a network?

I was accidentally using is_admin() to check if a user was an admin and found out that function is not checking that. So I looked for another one and I found is_super_admin() but that checks if you are a admin of a network of sites or owner of a single WordPress install. I have a […]

Hide post title input for all roles except admin

How would this function need to be updated to exclude the admin? add_action(‘admin_init’, ‘wpse_110427_hide_title’); function wpse_110427_hide_title() { if (current_user_can(‘subscriber’)) remove_post_type_support(‘post’, ‘title’); } Remove post title input from edit page

How do I diagnose a plugin resource 404?

I’m doing some work for a new client (non-tech, their former tech person left). Their version of WordPress is 4.3.2. The site gets some JavaScript errors on load. Using the Console I noticed two plugin resources don’t load throwing 404 (Not Found) errors: /wp-content/plugins/embed_quicktime/jquery-1.2.1.pack.js /wp-content/plugins/embed_quicktime/jquery.embedquicktime.js However other plugin resources load like: /wp-content/plugins/wp-greet-box/js/functions.js?ver=4.3.2 I looked in […]

Removing custom sort order from admin page listing

For the background to my question: On my page listing, I’ve got a set of pages that are countries and the child pages of those are categorised into ‘Types’. So I’ve got a page structure like this: Country 1 — Resource — Resource — Organisation — Overview Country 2 — Overview — Overview — Overview […]

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 trying to mentally keep track of which menu item is where. Being able to see this info while im doing […]

New “Custom Types” item in admin menu. Is this a plugin or a new wordpress feature?

I just noticed I have a “Custom Types” menu item on my wordpress backend (admin) menu. Picture: I tried disabling every plugin that has anything to do with custom post types and it was still there. So then I disabled every plugin in the backend and someone it is still there. New wordpress feature? Or […]

Is it possible to change the admin posts per page view?

In the admin panel (backend) when you go to “posts” it shows you a pagination (in my case with 29 posts per page). Is it possible to change to posts per page number for a specific post type? Thanks.

Use remove_meta_box conditionally on custom post type

I have a custom post type of people with some custom taxonomy boxes, i want to hide these when on child pages. I have found remove_meta_box works fine but i just can’t access the $post object within the action. Currently i have function remove_post_custom_fields($post) { global $post; if( count($post->ancestors) > 0 ){ remove_meta_box( ‘staff-typediv’ , […]

A similar hook as wp_head for the admin area

I’m adding a node to the toolbar and wish to tweak the css a bit. I don’t have any external CSS files and I’m echoing the CSS using the wp_head action hook. Is there a similar action hook that I can use to echo the CSS everywhere? Both front-end and admin area?

Shared account / dual blogging in WordPress

I am running my own hosting and domain, with WordPress installed on it. I am planning on posting there regularly, once or twice a day. However, a friend of mine would also like to contribute with his own blog posts. I’m wondering if there is a way to create a “guest” account on WordPress, with […]