//自定义文章类型文章首页置顶
add_action( 'add_meta_boxes', 'ashuwp_add_book_box' );
function ashuwp_add_book_box(){
add_meta_box( 'ashuwp_book_sticky', '自定义文章类型置顶', 'ashuwp_book_sticky', 'product', 'side', 'high' );
}
function ashuwp_book_sticky (){ ?>
<input id="super-sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky() ); ?> /><label for="super-sticky" class="selectit">置顶本产品</label>
<?php
}
效果图
