Viewing 1 replies (of 1 total)
  • Theme Author Richie KS

    (@rkcorp)

    this one a bit tricky, first choose any category for cat block 1 in theme option. also set how many post.

    create a new file in wp-content/ name it meso-custom-functions.php. and add this code.

    <?php
    function meso_custom_cat_one_post_type() {
    $value = 'post_type=product&showposts=5';
    return $value;
    }
    add_filter('meso_featcat_query_one','meso_custom_cat_one_post_type');
    
    function meso_custom_cat_one_link() {
    $value = 'https://www.123456789.com';
    return $value;
    }
    add_filter('meso_featcat_link_one','meso_custom_cat_one_link');
    
    function meso_custom_cat_one_name() {
    $value = 'YOUR CUSTOM LABEL';
    return $value;
    }
    add_filter('meso_featcat_name_one','meso_custom_cat_one_name');
    ?>

    replace the ‘post_type=product’ to your custom post type like ‘post_type=fan-fiction’

    all the cat block had filter to each one of them. just replace the function name in above ‘one’ to ‘two’ for each block if you had more than 1 custom post type to show.

    however this only query by post type not post type’s category/taxonomy.

Viewing 1 replies (of 1 total)
  • The topic ‘custom post type categories on home page?’ is closed to new replies.