Support

Account

Home Forums Front-end Issues Options page repeater field on a taxonomy template Reply To: Options page repeater field on a taxonomy template

  • After more Googling around, I found this:

    http://support.advancedcustomfields.com/forums/topic/repeater-field-broken-when-using-category-php-file/

    I already had something similar in my functions.php, but it obviously wasn’t quite right. This is the correct code:

    //Include CPT In Categories Pages
    function namespace_add_custom_types( $query ) {
        if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
            $post_types = get_post_types( '', 'names' ); 
            $query->set( 'post_type', $post_types);
            return $query;
        }
    }
    add_filter( 'pre_get_posts', 'namespace_add_custom_types');

    Still, respect for the help ractoon!