Last active
August 29, 2015 13:59
-
-
Save j-gardner/10469315 to your computer and use it in GitHub Desktop.
Exclude Additional Post Types from the Arconix Flexslider widget select box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// In your theme's functions.php file | |
// To add 1 post type to the exclude list | |
add_filter( 'arconix_flexslider_exclude_post_types', 'exclude_pt' ); | |
function exclude_pt( $post_types ) { | |
$post_types[] = 'post_type_name'; | |
return $post_types; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// In your theme's functions.php file | |
// To add multiple post types to the exclude list | |
add_filter( 'arconix_flexslider_exclude_post_types', 'exclude_pt' ); | |
function exclude_pt( $post_types ) { | |
// add your post type names here | |
$types = array( 'post_type_name_1', 'post_type_name_2', 'post_type_name_3' ); | |
foreach $types as $type { | |
$post_types[] = $type; | |
} | |
return $post_types; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment