Custom Sortable Meta Boxes
Custom Sortable Meta Boxes
Custom Sortable Meta Boxes
The problem is with your js. When you click on first video post. It adds video code to the iframe i.e modal. When you click on second video, it doesn’t add video code related to second post to iframe(modal). Confusing? Refresh your page and click on 2nd or 3rd video. It will show proper. Now … Read more
New WP_Query loop in admin causes problems
Retrieving Meta from Image Attachment
You will need to add your post types in an array. So your code should look like this ‘pages’ => array(‘post’, ‘sfwd-courses’, ‘sfwd-lessons’, ‘sfwd-topics’), You should also have a look at this tutorial that I find helpful as well
You can change the category metabox. You can create custom metabox as per your need which contains all categories in proper layout. Also you can search for plugins, say HTML5 category selector plugin http://wordpress.org/plugins/wp-html5-category-selector/
Resetting admin post form on JS validation fail
Firstly, have you inspected the meta box html from the browser? You may find that the form element that you have above is missing. This is because you cannot have nested form elements: <form> <form> </form> </form> All of the meta boxes are already inside of a form element, so you cannot specify another form … Read more
You can also use add_meta_box to add predefined boxes to different places in the admin, as long as you know the right handles. In the case of the comments meta box you need: add_meta_box(‘commentsdiv’, __(‘Comments’), ‘post_comment_meta_box’, $screen, ‘normal’); Here post_comments_meta_box is the callback function that fills the metabox. I am supposing your plugin is setting … Read more
I haven’t tested this but the idea is to check the post status, if the post is not published, show the metabox otherwise don’t. function non_publish_metaboxes() { global $post; if(!isset($post)) return; if($post->post_status !== ‘publish’){ // … Show Metabox } } add_action( ‘add_meta_boxes’, ‘non_publish_metaboxes’ );