Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is there a way to rewrite alchymyth’s solution to work with the auto excerpt (or, even better – limit the auto excerpt by characters (rather than words) at the source)?

    Thread Starter mikegreenis

    (@mikegreenis)

    I just dropped this into my functions.php and I now only get my custom post types showing on category requests.


    function show_workshowcase( $query ) {
    if ( is_category() )
    $query->set( 'post_type', array( 'work_showcase' ) );
    return $query;
    }
    add_filter( 'pre_get_posts', 'show_workshowcase' );

    But, of course, standard post category requests only show the custom post type. Any ideas how I can separate the two?

    Thread Starter mikegreenis

    (@mikegreenis)

    Thanks Curtiss.

    I would need to use a different category.php template (so as not to interfere with blog post category requests), in the same way you can have a single-{posttype}.php or archive-{posttype}.php template. However, ‘category-{posttype}.php’ is not supported.

    Is there a way to achieve category-{posttype}.php?

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