Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'pre_get_posts', 'exibir_cpt_prd_individual' );
- function exibir_cpt_prd_individual( $nova_query ) {
- if ( is_single() && $nova_query->is_main_query() )
- $nova_query->set( 'post_type', array( 'produto' ) );
- return $nova_query;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement