Remove Attachment Page for images in "Testimonials" Slider

All in the title - is there a way to remove the attachment page for the media files used in the “Testimonials” widget? I don’t want a separate page to be an option for viewers of my site.

Example of the slider on my site here: (scroll to bottom)

…and the unwanted page here:

*Note: this was not caught by the plugin “Attachment Pages Redirect”, which worked for all other media files.

Thanks in advance!

Hello there,

Please try adding this PHP code to your child theme’s functions.php file.

     * Redirect testimonials to homepage
    add_action('template_redirect', 'sydney_child_redirect_testimonial');
    function sydney_child_redirect_testimonial() {

      if( is_singular('testimonials') ) {
        return wp_redirect(get_bloginfo('url')); exit;


Or you can use a functionality plugin like Code Snippets without running a child theme. Ensure it’s enabled for front-end side.