Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'jnews_get_content_attr', 'change_post_type', 99, 3 );
- function change_post_type( $attr, $prefix, $id ) {
- if ( 'jnews_category_' === $prefix ) {
- $originals_cat_id = array( '_49', '_50' ); /* add your originals post category ids list with _ prefix */
- if ( in_array( $id, $originals_cat_id ) ) {
- $attr['post_type'] = array( 'originals', 'posts' ); /* use this code if you want to display posts & originals post type */
- $attr['post_type'] = 'originals'; /* use this code if you only want to display originals post type */
- }
- }
- return $attr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement