Tagged: x
-
AuthorPosts
-
January 4, 2017 at 3:39 am #1315460
AlexandreParticipantHi,
in accordance with a post i found about this topic i added the following to my 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”]’);
});I want the sharing function to be ONLY for posts however and not on the pages. How do i fix that issue?
Best regards,
AlexJanuary 4, 2017 at 3:39 am #1315462
AlexandreParticipantThis reply has been marked as private.January 4, 2017 at 3:47 am #1315468
ThaiModeratorHi There,
Please update your code to this:
add_action('x_before_the_content_end', function() { 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"]'); } });Hope it helps 🙂
January 4, 2017 at 8:05 am #1315736
AlexandreParticipantAs usual you solve the problem on the first try! Thanks a bunch!
January 4, 2017 at 8:33 am #1315785
ThaiModeratorYou’re most welcome 🙂
January 4, 2017 at 8:34 am #1315792
RahulModeratorYou’re most welcome!
Feel free to ask us again.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1315460 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
