WordPress.org

Forums

Sharedaddy
Share button not showing (6 posts)

  1. crashedout
    Member
    Posted 4 years ago #

    The site is showing the

    Share This:

    text but the Sharedaddy share button is not showing next to it. I've spoken to friends and this has happened over quite a few blogs.

    Maybe a update has broken it?

  2. p0l0
    Member
    Posted 4 years ago #

    This seems to be an bug, if some plugin calls "apply_filter", sharedaddy will be marked as rendered and it will not show up again.

    A quick and dirty fix is to change line 402 in file wp-content/plugins/sharedaddy/sharing-service.php from:

    // Only show once
         if ( isset( $shared_with_posts[$post->ID] ) )
            $show = false

    To

    // Only show once
         if ( isset( $shared_with_posts[$post->ID] ) ) {
             $found = strstr($text, '<div class="snap_nopreview sharing robots-nocontent">');
             $show = (empty($found))?true:false;
         }
  3. p0l0
    Member
    Posted 4 years ago #

    Sorry, the code would activate the sharing option even if it shouldn't be active. Now it should work as expected:

    // Only show once
         if ( isset( $shared_with_posts[$post->ID] ) && $show === true ) {
             $found = strstr($text, '<div class="snap_nopreview sharing robots-nocontent">');
             $show = (empty($found))?true:false;
         }
  4. hahne.s
    Member
    Posted 4 years ago #

    Thank you so much!

  5. redakaieye
    Member
    Posted 4 years ago #

    Worked like a charm for me as well! Thanks a million!

  6. j3rman
    Member
    Posted 4 years ago #

    This didn't quite work out for me. Any other suggestions?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Sharedaddy
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags