New answers tagged

0

If you want to show all the tags in the select box dropdown and also want to select the current tag should be on top in the select box And also you will move to the tag page while selecting the tag from the select box <select name="tags" id="tags" onchange="location = this.value;"> <?php $tags = get_tags(); $query = ...


0

You can implement meta boxes on other non-post_type admin pages but you need to manually call do_meta_boxes() where you want them to output. You also need to make sure that add_meta_box() action is run prior. You can see an example of this in /wp-admin/edit-form-comment.php... do_action( 'add_meta_boxes', 'comment', $comment ); do_action( '...


0

Ali, as mentioned in the comments here's the method I'd use to save. As you can see, it sets out the assorted fields and then runs the save process a single time, rather than setting the logic over and over for each field. function save_book_meta_data( $post_id ) { if( !current_user_can( 'edit_post', $post_id ) ) { return $post_id; } ...


0

The error there clearly says that there's an undefined variable (post) in your metabox callback function. So you need to define $post in your function head: // The $post variable is passed by WordPress. function diwp_post_metabox_callback( $post ) And you should also do the same to diwp_save_custom_metabox() function (which is hooked to save_post): // Here, ...


Top 50 recent answers are included