How to disable categories/most used in ‘add new post’?

remove_meta_box removes the whole Categories box. The Most used tab don’t have any hook. Don’t modify WordPress core files, there’s always a way to modify WP behavior without touching the core. /** * Place the script in the theme’s functions.php file */ add_action( ‘admin_head-post-new.php’, ‘wpse_70874_hide_most_used_cats’ ); add_action( ‘admin_head-post.php’, ‘wpse_70874_hide_most_used_cats’ ); function wpse_70874_hide_most_used_cats() { // This … Read more

Is WordPress Suitable for my site?

This is probably mostly a preference thing, but I don’t think WordPress is a great solution for sites outside of content creation. In my opinion, one of the weakest parts of WordPress is how they handle images and galleries. We are building a completely custom interface for creating galleries on our application because it’s so … Read more

Creat new admin url for custom post type

You want (probably) add_submenu_page. The first parameter– the one listed as $parent_slug in the Codex is going to be edit.php?post_type=your-post-type-name, like this (mostly cribbed from the Codex page): function add_submenu_wpse_81844() { add_submenu_page( ‘edit.php?post_type=your-post-type-name’ , ‘My Custom Submenu Page’ , ‘My Custom Submenu Page’ , ‘manage_options’ , ‘my-custom-submenu-page’ , ‘my_custom_submenu_page_callback’ ); } add_action(‘admin_menu’, ‘add_submenu_wpse_81844’); Check the … Read more

Separate tags with semicolon

The tag delimiter is made translatable: $comma = _x( ‘,’, ‘tag delimiter’ ); So this can be changed with a simple filter: add_filter( ‘gettext_with_context’, ‘t5_semicolon_tag_delimiter’, 10, 4 ); function t5_semicolon_tag_delimiter( $translated, $text, $context, $domain ) { if ( ‘default’ !== $domain or ‘tag delimiter’ !== $context or ‘,’ !== $text ) return $translated; return ‘;’; … Read more

Remove “Published On” inside wp-admin

You could hide it for non-admins with CSS: function hide_curtime_wpse_96106() { if(get_post_type() === “post”){ if(!current_user_can(‘manage_options’)){ // only for non-admins echo “<style>.misc-pub-section.curtime {display:none !important;} </style>”; } } } Before: After:

Validating widget’s configuration data on Admin page

@tf is almost there, I think. You can use JS on your widget’s admin form, as I’ve done it before (though not for validation). Within your widget’s constructor, add an action: add_action( “admin_print_scripts-widgets.php”, array( __CLASS__, ‘register_my_validation_script’ ) ); Then create the corresponding function inside your widget’s class: function register_my_validation_script() { wp_enqueue_script( ‘my-script-handle’, plugins_url( ‘/my-validation-script.js’, __FILE__ … Read more

Adding an Archive button to posts page for administrators

Here is something i have used before as a solution for changing the post category (or any term/taxonomy) just make sure you set the right $post_type,$append,$taxonomy,$terms <?php /* Plugin Name: Simple Ajax set cat Plugin URI: http://en.bainternet.info Description: dead simple lightweight plugin to add a post row action link to set a post category by … Read more