Hiya
See private info for working example of what I mean…..
Any thoughts on how to hide these….? It’s really urgent as we cannot go live with this huge error. Please urgently advise.
Regards hiding testimonials, do you think this would work as a function? And if so can we also edit to hide the email blocks?
===========================
add_action( ‘init’, ‘exclude_testimonials_from_search’, 99 );
function exclude_testimonials_from_search() {
global $wp_post_types;
if ( post_type_exists( ‘wpm-testimonial’ ) ) {
// exclude from search results
$wp_post_types[‘wpm-testimonial’]->exclude_from_search = true;
}
}
===========================
Or This – can hide testimonials etc but not the customizer emails… I have decided to install this instead of the snippet above because I can control all the other static blocks that are showing up –> https://wordpress.org/plugins/mpress-hide-from-search/