Skip to content

Instantly share code, notes, and snippets.

@j-gardner
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-gardner/10469315 to your computer and use it in GitHub Desktop.
Save j-gardner/10469315 to your computer and use it in GitHub Desktop.
Exclude Additional Post Types from the Arconix Flexslider widget select box
<?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;
}
<?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