Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1384513
    Andrew Stroud
    Participant

    I’m wanting to add social sharing buttons to single, standard posts’ meta data. I also want to remove the “Leave a Comment” option since I already have Facebook comments enabled. Can you help me figure out how to do this?

    Currently the meta-data looks like this: https://www.intotheharvest.org/six-heroes-of-faith/

    #1385035
    Friech
    Moderator

    Hi There,

    Thank you for writing in! Please follow this post on how you can disable the discussion (Leave a Comment).

    And then this post for adding a share button on every post page.

    Let us know how it goes.

    Cheers!

    #1385051
    Andrew Stroud
    Participant

    Thanks but I’m not sure that what I was asking was understood. I’m wanting to add the social share buttons to the meta data line just below the post heading, not at the bottom of the post. I am also wanting to remove the text “Leave a Comment” from the meta data line. Please see attached screenshot.

    I have searched the forum and I also reviewed the links you provided. When I disable the discussion it also disables the Facebook Comments Plugin. I don’t want that, I just want to remove the “Leave a Comment” link from the meta data line.

    Thanks for any help you can offer!

    #1385052
    Andrew Stroud
    Participant

    My screenshot for the above post failed to upload. Here it is.

    #1385216
    Christopher
    Moderator

    Hi there,

    Please add following code in Customize -> Custom -> Global CSS :

    p.p-meta span:nth-child(3), p.p-meta span:nth-child(2):after {
        display: none;
    }

    Please update your code in child theme’s functions.php file to :

    function share_for_posts( $content ) {
      if ( is_singular('post') ) {
        echo do_shortcode('[share title="Share this Post" email="true" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true"]');
      }
    }
    
    add_action('x_before_the_content_begin', 'share_for_posts');

    Buttons will be displayed just below meta data.

    Hope it helps.

    #1385502
    Andrew Stroud
    Participant

    Thanks so much, that definitely removed the comments text from the meta line.

    For the social share buttons, I found this thread in the forum and have tried to implement for my site but the CSS just jumbles everything when I alter my functions.php: https://community.theme.co/forums/topic/social-share-buttons-in-post-meta-data/

    Can you help me figure out how to set it up so that the social share buttons display to the right and in line with the rest of my single, standard posts’ meta data instead of just below it? I’m wanting them to display similar to this site: http://bitterempire.com/mr-robot-vs-deutschland-83/

    Thanks again for any help you can give me on this!

    #1385518
    Thai
    Moderator

    Hi There,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link login to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1385557
    Andrew Stroud
    Participant
    This reply has been marked as private.
    #1385870
    Rad
    Moderator

    Hi there,

    Please add this custom CSS as well,

    .share-before_entry_header {
        float: right;
    }

    Thanks!

    #1386626
    Andrew Stroud
    Participant

    That didn’t seem to affect anything but I think we’re close! I just need to move the share buttons up so that they are in-line with the rest of the meta data.

    Right now they display just below, as seen here: https://intotheharvest.org/six-heroes-of-faith/

    I have tried to play around with the functions.php file and Custom CSS to move the buttons up but so far no success. Any help you can give will be much appreciated!

    #1386830
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! Do you want something like this?

    If that is the case, please do the following:
    #1] Please add the following JS code in the customizer, Appearance > Customize > Custom > Edit Global Javascript

    (function($) {
    	$('.custom-share').appendTo( $('.entry-header') );
    })(jQuery);

    #2] Please add the following css code in the customizer, Appearance > Customize > Custom > Edit Global CSS

    .x-entry-share.custom-share {
        margin-top: 10px;
    }

    We would loved to know if this has work for you. Thank you.

    #1387549
    Andrew Stroud
    Participant

    That did the trick! Thank you for helping me sort this out. You all are amazing!

    #1387561
    Joao
    Moderator

    Thanks for your kind words!

    #1387711
    Andrew Stroud
    Participant

    Thank you all for the great customer service!

    I do have one additional question: I like the size of the social share buttons right now on the meta data line, but I’d like to increase the size of the social share buttons at the bottom of the post… is this possible?

    #1387859
    Friech
    Moderator

    Hi There,

    You can add this under Custom > CSS in the Customizer.

    .single-post .content .x-entry-share .x-share {
        font-size: 2em;
        width: 2em;
        height: 2em;
        line-height: 2em;
    }

    Feel free to adjust the 2em value.

    Thanks.

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