Tagged: x
-
AuthorPosts
-
May 10, 2016 at 6:45 pm #984938
abrightdesignParticipantHello,
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,
AdamMay 10, 2016 at 11:55 pm #985331
Prasant RaiModeratorHello 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.
May 16, 2016 at 1:20 am #993073
Amanda PParticipantHello,
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
May 16, 2016 at 1:24 am #993074
RupokMemberHi there,
In that case you can add this under Custom > CSS in the Customizer.
.blog .x-entry-share { display: none; }Hope this helps.
Cheers!
May 16, 2016 at 2:59 pm #994270
Amanda PParticipantperfect answer! thank you
May 16, 2016 at 5:30 pm #994481
RahulModeratorYou’re welcome!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-984938 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
