Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- These two functions will allow the SmartMag theme to see a custom post type in the slider and
- also add the Post Options to the CPT (otherwise you can't add the cpt to be a featured slider).
- */
- //allow CPT in slider
- function bgm_swap_slider_to_games_cpt($args) {
- $args['post_type'] = array( 'post', 'games');
- return $args;
- }
- add_filter('bunyad_block_query_args','bgm_swap_slider_to_games_cpt');
- //give the CPT the Post Options options.
- function bgm_make_theme_see_cpt( $args ) {
- $args['meta_boxes'] = array(
- array('id' => 'post-options', 'title' => __('Post Options', 'bunyad'), 'priority' => 'high', 'page' => array('post', 'games')),
- array('id' => 'post-reviews', 'title' => __('Review', 'bunyad'), 'priority' => 'high', 'page' => array('post')),
- array('id' => 'page-options', 'title' => __('Page Options', 'bunyad'), 'priority' => 'high', 'page' => array('page')),
- );
- return $args;
- }
- add_filter('bunyad_init_config','bgm_make_theme_see_cpt');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement