Sorry for the mistype, I means “forbid”
anonymized-13171256
(@anonymized-13171256)
The Properties add-on gives you complete control over that.
https://strongplugins.com/plugins/strong-testimonials-properties/
Or add this to your theme’s functions.php or an mu-plugin:
/**
* Testimonial post type
*/
function my_testimonial_cpt( $args ) {
$args['public'] = false;
return $args;
}
add_filter( 'wpmtst_post_type', 'my_testimonial_cpt' );
Then go to General Settings > Permalinks and simply click Save Changes.
That will disable testimonial permalinks and consequently the “Read more” option.
Thank you. Now when I visit the testimonial at its previous url, I get redirected to the main page, so all new testimonials (and all old ones) still get urls, they just get redirected (301). But is there a way to stop testimonials from forming new urls completely? So that such urls (site.com/testimonials/name-of-testimonial) wouldn’t exist (404 error), and not just get redirected? Or am I mistaken in saying that testimonials urls are now redirected? Thanks again.
anonymized-13171256
(@anonymized-13171256)
Try this instead:
/**
* Testimonial post type
*/
function my_testimonial_cpt( $args ) {
$args['public'] = false;
$args['publicly_queryable'] = false;
$args['exclude_from_search'] = true;
$args['query_var'] = false;
return $args;
}
add_filter( 'wpmtst_post_type', 'my_testimonial_cpt' );