Disable dragging of meta boxes?

I had the same problem, and Google lead me here. Unfortunately none of these answers helped, but I ultimately figured out the answer, and it’s quite easy! First, enqueue a JavaScript file (I won’t rehash this process; there are many tutorials that can describe this process better than I). I hooked into admin_enqueue_scripts, and it … Read more

Order by multiple meta key and meta value [closed]

meta_query is an array of meta clauses. For example: $q = new WP_Query( array( ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => ‘state’, ‘value’ => ‘Wisconsin’, ), array( ‘key’ => ‘city’, ‘compare’ => ‘EXISTS’, ), ), ) ); You can use an associative array, with a key for each meta clause: $q = new … Read more

Only one category per post

Actually, I wrote a plugin for exactly that. http://wordpress.org/extend/plugins/radio-buttons-for-taxonomies/ In the plugin settings you define which taxonomies you’d like to apply this restriction to.

How to set default screen options?

You are referring to the metaboxes on the admin post screen right? For that you don’t need a plugin, just drop the following into your functions.php file. // add_action(‘user_register’, ‘set_user_metaboxes’); add_action(‘admin_init’, ‘set_user_metaboxes’); function set_user_metaboxes($user_id=NULL) { // These are the metakeys we will need to update $meta_key[‘order’] = ‘meta-box-order_post’; $meta_key[‘hidden’] = ‘metaboxhidden_post’; // So this can … Read more

Set Default Admin Screen options & Metabox Order

Setting the order of meta boxes on post edit pages You will need to remove the meta boxes, and add them again in the order you want. To disable meta boxes: (customize to your needs, look at the metabox id in the html code to know which name you should use as first parameter of … Read more

How can I put a custom meta box above the editor but below the title section on the edit post page?

Simply add a meta box using the advanced context, and high priority Then, latch on to the edit_form_after_title hook Print your meta boxes out there, then remove it so it doesn’t appear twice. // Move all “advanced” metaboxes above the default editor add_action(‘edit_form_after_title’, function() { global $post, $wp_meta_boxes; do_meta_boxes(get_current_screen(), ‘advanced’, $post); unset($wp_meta_boxes[get_post_type($post)][‘advanced’]); });

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)