WordPress.org

Ready to get started?Download WordPress

Forums

IvyCat AJAX Testimonials
[resolved] Share buttons in footer show in IvyCat testimonials widget (2 posts)

  1. Ken Soszka
    Member
    Posted 1 year ago #

    Hi, great plugin, thanks for creating it! I use a share button plugin that puts share buttons in the footer of my posts. Unfortunately, when I use the testimonials widget the share buttons show in the testimonials too. The share button plugin that I am using is called Hupso Share Buttons. Here is a screenshot of my issue:

    http://dev1.kensoszka.com/share-in-footer-using-widget.jpg

    I am comfortable with editing the plugin files, or using a custom template for the testimonials if you have any ideas.

    Thank You,
    Ken Soszka

    http://wordpress.org/extend/plugins/ivycat-ajax-testimonials/

  2. ivycat
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Ken,

    It looks like that particular sharing plugin doesn't offer much in hooks or settings to disable this. I tried adding category to the testimonials and disabling it that way but no go. Anyway, I found a way that works, but bear with me, it's a bit more convoluted.

    On ~ line 266 in the ivycat-ajax-testimonials.php file (after $testimionial_data = array() ) add in this bit:

    do_action( 'ica_pre_loop_testimonials', $testimonials );

    I'll update the plugin later to contain this action hook and push it on our next release.

    Then just add this bit of code to your functions.php file:

    function remove_hupso_share_testimonials( $testimonials ){
      if( !$testimonials )
        return;
      remove_filter( 'the_content', 'hupso_the_content', 10 );
    }
    
    add_action( 'ica_pre_loop_testimonials', 'remove_hupso_share_testimonials', 10 );

    Let me know if this works/doesn't work for you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic