en English
X
error: Content is protected !!
//Remove a post type from searches add_action( 'register_post_type_args', 'mws_remove_courses_from_search', 1, 2); function mws_remove_courses_from_search( $args, $post_type ) { if ( 'sfwd-courses' == $post_type ){ $args['exclude_from_search'] = true ; } if ( 'sfwd-lessons' == $post_type ){ $args['exclude_from_search'] = true ; } if ( 'sfwd-topic' == $post_type ){ $args['exclude_from_search'] = true ; } return $args; }