Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function blog_meta_box() {
- add_meta_box(
- 'blog_meta_box',
- __( 'Other Details', 'myplugin_textdomain' ),
- 'blog_meta_box_content',
- 'post',
- 'normal',
- 'high'
- );
- }
- function blog_meta_box_content( $post ) {
- wp_nonce_field( plugin_basename( __FILE__ ), 'blog_meta_box_content_nonce' );
- $include_featured = get_post_meta( $post->ID, 'include_featured', true );
- ?>
- <table width="100%" class="aankun_custom_metabox">
- <tr>
- <td width="200">Featured Image on Detail</td>
- <td>
- <select name="include_featured">
- <option value="no" <?php if($include_featured=='no') echo 'selected="selected"'; ?> >no</option>
- <option value="yes" <?php if($include_featured=='yes') echo 'selected="selected"'; ?> >yes</option>
- </select>
- </td>
- </tr>
- </table>
- <?php
- }
- add_action( 'add_meta_boxes', 'blog_meta_box' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement