Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #984938
    abrightdesign
    Participant

    Hello,

    I’m looking to add the social share box to all of my blog posts by default. I understand I need to edit some php to achieve this. I have a child theme setup.

    I searched and found a similar thread and tried what was instructed and it did not work for me so I thought I’d ask fresh.

    I’m using the renew stack.

    Thanks,
    Adam

    #985331
    Prasant Rai
    Moderator

    Hello Adam,

    Thanks for writing in!

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

    After that kindly add the code below in your child theme functions.php.

    add_action('x_before_the_content_end', function() {
      echo do_shortcode('[share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]');
    });

    Let us know how it goes.

    Thanks.

    #993073
    Amanda P
    Participant

    Hello,

    I am using this technique, however, I do not want to show the share buttons on the blog page where it lists all of the posts. I only want to show the buttons when they open the post.

    Is this possible?

    Thank you

    #993074
    Rupok
    Member

    Hi there,

    In that case you can add this under Custom > CSS in the Customizer.

    .blog .x-entry-share {
      display: none;
    }

    Hope this helps.

    Cheers!

    #994270
    Amanda P
    Participant

    perfect answer! thank you

    #994481
    Rahul
    Moderator

    You’re welcome!

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