• Resolved ryankolalis

    (@ryankolalis)


    For original wp posts I can view them by category.
    When I try and view a new custom post type I get a nothing found page. using template twentythirteen. any idea on what is going on?

    I have changed permalink back to default and the issue still persists.
    Post types are set to use category and tags in its settings.

    https://wordpress.org/plugins/magic-fields-2/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ryankolalis

    (@ryankolalis)

    does it have something do to with the categories for all my custom post types being linked together. Example I have a post type of reps who’s categories would be United States, Mexico… Then i have another post type of news with categories like trade shows. email blasts… But in each post type I can see the others categories. United states is a category for news and email is a category for reps.

    ?

    Thread Starter ryankolalis

    (@ryankolalis)

    The answer for this is pre get posts by the way.

    function add_custom_types_to_tax( $query ) {
    if( is_category() || is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) {

    // Get all your post types
    $post_types = get_post_types();

    $query->set( ‘post_type’, $post_types );
    return $query;
    }
    }
    add_filter( ‘pre_get_posts’, ‘add_custom_types_to_tax’ );

    credit to WPMUDEV

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Category returning Nothing Found’ is closed to new replies.