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

    (@jkahuisman)

    Neither for me…

    jkahuisman

    (@jkahuisman)

    Got the solution, you just have to enter a code in the wp_cpn_ouput_gen.php. Around line 33 is the next code:

    $arg = array(
    ‘cat’ => $cat_id,
    ‘numberposts’ => $op[‘list_num’],
    ‘orderby’ => $wp_cpl_sort_array[$op[‘sort_using’]],
    ‘order’ => ((true == $op[‘sort_order’])? ‘ASC’ : ‘DESC’),
    ‘post__not_in’ => $op[‘exclude’]
    );
    Just add your own line:

    $arg = array(
    ‘post_type’ => ‘your custom post type’,
    ‘cat’ => $cat_id,
    ‘numberposts’ => $op[‘list_num’],
    ‘orderby’ => $wp_cpl_sort_array[$op[‘sort_using’]],
    ‘order’ => ((true == $op[‘sort_order’])? ‘ASC’ : ‘DESC’),
    ‘post__not_in’ => $op[‘exclude’]

    );

    For all post type

    $arg = array(
                'post_type' =>  get_post_types(),
                'cat' => $cat_id,
                'numberposts' => $op['list_num'],
                'orderby' => $wp_cpl_sort_array[$op['sort_using']],
                'order' => ((true == $op['sort_order'])? 'ASC' : 'DESC'),
                'post__not_in' => $op['exclude']
            );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Any easy way to support custom post types?’ is closed to new replies.