Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1262796
    Karl K
    Participant

    I know this has been posted here a number of times, however I can’t seem to find a solution that works. I’m trying to add social sharing buttons to the bottom of all published posts (no pages). I tried adding this code to my functions.php file with no luck:

    // Add Social Sharing after the single post content
    // =============================================================================
    
    function x_add_social_sharing ( $content ) {
      if ( is_singular('post') ) {
        echo do_shortcode('[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]');
      }
    }
    add_action('x_before_the_content_end', 'x_add_social_sharing');

    Any other suggestions?

    The website, BTW, is guysdrinkingbeer.com. And I can provide login credentials if needed.

    Thanks,

    Karl

    #1263076
    Friech
    Moderator

    Hi Karl,

    Thanks for writing in! That code works on my dev site. Please provide us login credentials (FTP and Admin) in private reply so we can take a closer look.

    Cheers!

    #1266919
    Karl K
    Participant

    Odd. I tried clearing caches, but still couldn’t get anything to show up. I think, for now, I may go without social sharing buttons and see how that goes, although I may revisit this in a few weeks though. Thanks.

    #1266965
    Rahul
    Moderator

    Sure, you can go ahead with that.

    We are always here standing by to assist you in anyway.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-1262796 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>