• Resolved amaunsworth

    (@amaunsworth)


    hi there,
    i want to remove the image placeholder on the testionial page.
    i removed the code below and it still shows up? i don’t even have an option in the admin for each testimonial to add a featured image anyways.

    <?php if( has_post_thumbnail( $this->ID ) ): $image = wp_get_attachment_image_src( get_post_thumbnail_id( $this->ID ), array( 200, 200 ) ); ?>
    <img style=”float: left; padding: 10px;” src=”<?php echo $image[0]; ?>” width=”<?php echo $image[1]; ?>” height=”<?php echo $image[2]; ?>” />
    <?php endif; ?>

    https://www.ads-software.com/plugins/clean-testimonials/

Viewing 1 replies (of 1 total)
  • Plugin Author lukerollans

    (@hellolukerollansme)

    Hey amaunsworth,

    You should never remove code from a plugin. Any changes you make will break when a new version is released, and that will most likely cause even more serious issues on your site.

    There’a a good selection of hooks and filters available to help you customize how Clean Testimonials renders testimonials. You can find them in the README over at GitHub here: https://github.com/plugify/clean-testimonials

    For example, I would use the ct_pre_render_testimonial hook to override how your testimonials are being rendered entirely, and skip the featured image altogether.

    A very basic example which is untested (add this to your functions.php file). This will output only the testimonial content itself whenever you output a testimonial

    function customize_my_testimonial( $testimonial, $context ) {
      echo $testimonial->post_content;
    }
    add_filter( 'ct_pre_render_testimonial', 'customize_my_testimonial', 10, 2 );
Viewing 1 replies (of 1 total)
  • The topic ‘remove image placeholder’ is closed to new replies.