Tagged: x
-
AuthorPosts
-
October 4, 2016 at 8:12 pm #1202792
Jacko_PintoParticipantHello.
1. I’d like to deactivate commenting on posts all together. What we’re doing at this point is simply unchecking the comments box for each new post.
2. I’d like to add the “Social Sharing” feature for every post so that readers can easily share posts on their social channels.
Can you please help with that?
October 4, 2016 at 8:12 pm #1202794
Jacko_PintoParticipantThis reply has been marked as private.October 4, 2016 at 11:28 pm #1202939
Prasant RaiModeratorHello Jacko,
Thanks for writing in!
1) Please use Disable Comments to disable comments.
2) Inorder to display share icons will 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.
Then add the following code in your Child Theme’s functions.php file:
function share_for_individual_post( $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', 'share_for_individual_post');Let us know how this goes.
October 5, 2016 at 2:02 pm #1203876
Jacko_PintoParticipantThanks for commenting.
So I’d need to disable comments for each post? Is there any way to disable it automatically for every post?
Thanks!
October 5, 2016 at 3:13 pm #1203974
JoaoModeratorHi There,
Please add the following code to functions.php of your Child theme.
function default_comments_off( $data ) { if( $data['post_type'] == 'page' && $data['post_status'] == 'auto-draft' ) { $data['comment_status'] = 0; } return $data; } add_filter( 'wp_insert_post_data', 'default_comments_off' );Let us know how it goes,
Joao
October 10, 2016 at 7:00 pm #1210628
Jacko_PintoParticipantThank you. Will this deactivate comments for active posts or just for the new ones we create?
I appreciate the help. Best regards.
October 11, 2016 at 1:44 am #1211011
FriechModerator -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1202792 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>

