Custom post likes, share, related etc.

Hi guys,

Got few difficult questions (difficult for me).

I've tried JetPack and it's awesome, but every single plugin needs confirmation and login to wordpress.com which is not acceptable, so I was wondering are there any similar plugins they are offering in their settings.

I need just few of them:

1.Simple like button to my multisite post, not facebook likes (JetPack has one)

2. Related posts

3. Simple share buttons without options for my user to modify it.

Any help is more than appreciated.

  • Tyler Postle
    • CGO

    Hey Eldin,

    More than happy to help you out with this!

    1.Simple like button to my multisite post, not facebook likes (JetPack has one)

    How about our post voting plugin? :slight_smile:

    https://premium.wpmudev.org/project/post-voting-plugin/

    2. Related posts

    I have heard good things about YARPP and we actually have a blog post on it too: https://premium.wpmudev.org/blog/wordpress-related-posts-plugin/

    Blog post is a bit old; however, content still seems quite relevant :slight_smile:

    3. Simple share buttons without options for my user to modify it.

    Have you checked out our floating social plugin? https://premium.wpmudev.org/project/floating-social/

    Another popular option would be this one: https://wordpress.org/plugins/simple-share-buttons-adder/

    Hope that helps Eldin! Let us know if you still need any further assistance.

    All the best,
    Tyler

  • Voxxyz
    • The Incredible Code Injector

    @Tyler thanks a lot man as always :slight_smile:

    First two options works like a charm. Still having problems with social.

    1. Floating social is not exactly what i was looking so i skipped it.
    2. Simple share buttons, explained earlier, users have to fix it by themselves, so not, i can't use it.

    Wondering is there a way for me, Super Admin to fix those share buttons for whole network not user by themselves..

  • aristath
    • Recruit

    Hello again @Eldin, I hope you're well today!

    Wondering is there a way for me, Super Admin to fix those share buttons for whole network not user by themselves..

    Sure there is!!
    Follow the following steps:
    1. Go to https://www.addthis.com/ and some new share buttons. You can use any similar site you want, it doesn't really matter.
    2. the code you get will look like this:

    <div class="addthis_sharing_toolbox"></div>
    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4e994de6a3ee6a" async></script>

    (please don't use the above as it will not work, the id there is random)
    3. Create a new file in your wp-content/mu-plugins.
    If that folder does not exist then you will have to manually create it.
    So... create a file there so that it has a path like this: wp-content/mu-plugins/my-shares.php
    In that file enter the following:

    <?php
    
    function my_custom_network_shares( $content ) {
    
      $shares = '
      <div class="addthis_sharing_toolbox"></div>
      <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4e994de6a3ee6a" async></script>
      ';
    
      return $content . $shares;
    }
    add_filter( 'the_content', 'my_custom_network_shares' );

    Lines 6-7 are the code you got earlier.
    This will add the share buttons on all posts and pages on your site.

    I hope that helps!

    Cheers,
    Ari.

  • Voxxyz
    • The Incredible Code Injector

    @Aristath thank you my man, that's exactly what i was looking, and it works like a charm. Thank again so much.

    Got one more question but it's not priority, just wondering, how to disable this sharing icons on pages.

    Thanks in advance!

  • aristath
    • Recruit

    Hello again @Eldin, I hope you're well today!

    I'm glad the above "hack" worked for you...
    If you want to disable it on page then you'd have to do it like this:

    <?php
    
    function my_custom_network_shares( $content ) {
    
      $shares = '
      <div class="addthis_sharing_toolbox"></div>
      <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4e994de6a3ee6a" async></script>
      ';
    
      if ( is_singular( 'page' ) ) {
        return $content;
      } else {
        return $content . $shares;
      }
    }
    add_filter( 'the_content', 'my_custom_network_shares' );

    I hope that helps!

    Cheers,
    Ari.

  • Voxxyz
    • The Incredible Code Injector

    Hi guys,

    This topic is resolved, so not to opet new one, got one question to ask, just for an info...

    I've updated this php code @aristath gave me, and now i don't see any social icons anymore. Actually i've updated on AddThis web site, (changed icon style) and now i don't have those icons at all. They say it could take few refreshes for web site to icons be seen, but i've been waiting for couple of hours...

  • aristath
    • Recruit

    Hello again!

    Try using this code:

    <?php
    
    function my_custom_network_shares( $content ) {
    
      $shares = '
      <div class="addthis_sharing_toolbox"></div>
      <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=eldinovsky" async="async"></script>
      ';
    
      if ( is_singular( 'page' ) ) {
        return $content;
      } else {
        return $content . $shares;
      }
    }
    add_filter( 'the_content', 'my_custom_network_shares' );

    Let me know if that works for you!

    Cheers,
    Ari.

  • Voxxyz
    • The Incredible Code Injector

    I saw these errors too, but had no idea that could cost them not to work.

    However, using only AdSense below post, where these social icons were, and it's turned off.

    Now I still see errors of Facebook, and i don't have anything with facebook related, except "like box" which is in the widget area...

  • Voxxyz
    • The Incredible Code Injector

    Update:

    There is still little piece of the code that's missing in the lines above:

    <!-- Go to http://www.addthis.com/dashboard to customize your tools -->
    <div class="addthis_native_toolbox"></div>

    I've added this line below this one:

    <div class="addthis_sharing_toolbox"></div>
      <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=eldinovsky" async="async"></script>

    and it works now.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.