Articles of wp admin

Change link for “add new” buttons on custom post type

I know how to use capabilities to remove the “Add New” functionality for a custom post type, but what I really need to do is change the target of those links. Does anyone know how I might go about doing that? I would be an “external” link (to the front end of the website) and […]

How to remove a CPT Menu from the Root Admin only

So im currently developing a plugin, this plugin has a new CPT that i would like to exclude its menu from the admin page of the first site. Im using a multi-site installation. The menu has to only be visible to the other site admins but not the first one. The Link where i want […]

How to Remove Checkbox for Excerpt Under Screen Options

In relation to How to Display Post Excerpts in Admin by Default?, how would we go about removing the checkbox for Excerpt under screen options entirely for a complete solution?

How to exclude authors from get_pages()

I am trying to filter the results for the wp_dropdown_pages function by author, here is what I have so far. $dropdown_args = array( ‘post_type’ => $post->post_type, ‘exclude_tree’ => $post->ID, ‘selected’ => $post->post_parent, ‘name’ => ‘parent_id’, ‘show_option_none’ => __(‘(no parent)’), ‘sort_column’ => ‘menu_order, post_title’, ‘echo’ => 0, ‘authors’ => ‘-11’, ); wp_dropdown_pages( $dropdown_args ); When I […]

Is there a filter to edit html of user-edit.php

I am looking for a filter to edit html of user-edit.php just before it is echoed. To be more specific, I need to disable selecting multiple roles in Other Roles. But this filter would be very handy for other stuff too. And for other admin pages as well.

How do I add something to the “Edit Tag” page in wp-admin?

I have some term_meta that I would like to display on the “Edit Tag” page in wp-admin. I found the following two action hooks, but both don’t do what I want. edit_tag_form edit_tag_form_pre These hooks either add something inside the form at the start, or at the end of the form, but before the “Update” […]

Restrict Viewing of post on both front and backend?

Any ideas to restrict viewing of posts to post author only? The twist: Restrict both back AND frontend. I’d like to avoid the role scoper plugin. Example: The author creates a post, and can now view live on the site, as well as in the admin panel. They can edit, trash, whatever. But only admins […]

Creating custom admin panel pages without making a plugin?

I have some functionality on my site that I’d like the administrators to be able to handle without going directly into the database. I’m thinking that the cleanest way would be to create new pages within WP’s own admin panel. I’ve found lots of documentation on how to create menu pages (add_menu_page()), how to create […]

Custom role based users are not able to access wp-admin

First of all I am a WordPress learner. So sorry if my code looks stupid! I have created a custom theme with a custom user role. I am not developing any plugin. In my fucntions.php file I have written the following code to create a User role. Users assigned to this role are supposed to […]

WordPress ajax-action failing because of newline in response

When I’m using the dashboard, for example, adding a category. The request returns valid XML as expected, but it is prepended with a newline character, causing the DOMParser() to fail. I’m not sure where to proceed for debugging, it happens on one site and not another (different server, different theme). I’ve checked, none of the […]