How to disable Edit Post and Allow only Custom Field?

You can remove post type support for the editor on a conditional basis. The following should work: add_action( ‘add_meta_boxes’, ‘wpse45113_remove_editor’ ); function wpse45113_remove_editor() { // change the capability and post type to whatever is appropriate if ( ! current_user_can( ‘install_plugins’ ) ) remove_post_type_support( ‘post’, ‘editor’ ); } I’m using add_meta_boxes because it fires not too … Read more

How to change the post form from plugin?

If you want to change/add something to post form, you have to deal with meta boxes. I would recommend you to read through these articles: Reusable Custom Meta Boxes Part 1: Intro and Basic Fields Reusable Custom Meta Boxes Part 2: Advanced Fields Reusable Custom Meta Boxes Part 3: Extra Fields Reusable Custom Meta Boxes … Read more

Is there a query string for edit.php to show all posts that have no custom taxonomy terms?

Use a tax_query with a NOT IN operator. $args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘sms_premium_posts’, ‘field’ => ‘slug’, ‘terms’ => ‘Premium’, ‘operator’ => ‘NOT IN’ ) ) ); $query = new WP_Query( $args ); Now, to make that work on the post edit page via a $_GET string something … Read more

Suddenly new posts have the default permalink instead of the post name

Nothing just happens for “no apparent reason”. Some new condition has caused this. Most likely a new plugin or update of an existing plugin. It is possible for a plugin or theme doing something crazy like flushing rewrite rules on every load could wipeout the existing rules. See this ticket for more info: http://core.trac.wordpress.org/ticket/18450#comment:34 if … Read more

Remove Permalink From Admin Edit Post

I’m running the most up to date version of WordPress which has made changes to how permalinks are displayed and handled. There’s no longer a View Post button. I was able to remove the whole area using the get_sample_permalink_html hook. Just return an empty string: function hide_permalink() { return ”; } add_filter( ‘get_sample_permalink_html’, ‘hide_permalink’ );

disable tags on wordpress text editor

WordPress already disallows the use of JavaScript in the editor for users without the unfiltered_html capability. By default, only the Administrator and Editor roles have this capability. If necessary, you could remove this capability from Editor users as well. (It doesn’t make sense to remove it from Administrators, because they will still have the ability … Read more