Answer the question
In order to leave comments, you need to log in
How to remove permalinks from products?
I don't need the products to open on a separate page. Is it possible to remove perms, that is, make the post type non-public?
Answer the question
In order to leave comments, you need to log in
Yes, it's possible. But you have to use a separate hook. For example like this,
add_filter( 'woocommerce_register_post_type_product', 'artabr_modify_product_post_type' );
function artabr_modify_product_post_type( $args ) {
$args['public'] = false;
$args['publicly_queryable'] = false;
return $args;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question