At first, I'm sorry for my english, I'll try to do my best because I'm Argentinian.
I am using publicize to send my wordpress post's to my Facebook Fanpage.
This is how publicize send automatic posts.
And I just need to delete description to send posts like this:
What should I do? I am trying to solve this but I can't.
Thanks!
At first, I'm sorry for my english, I'll try to do my best because I'm Argentinian.
I am using publicize to send my wordpress post's to my Facebook Fanpage.
This is how publicize send automatic posts.
And I just need to delete description to send posts like this:
What should I do? I am trying to solve this but I can't.
Thanks!
Share Improve this question asked Aug 11, 2018 at 19:56 TinchoTincho 112 bronze badges 3 |1 Answer
Reset to default 0Remove Jetpack's publicize description with this code. Add this code to your theme's functions.php
// Remove description of posts on social share
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'publicize' ) ) {
function tsj_publicize_hashtags() {
$post = get_post();
if ( ! empty( $post ) ) {
$custom_message = get_the_permalink();
update_post_meta( $post->ID, '_wpas_mess', $custom_message );
}
}
/* Save that message */
function tsj_cust_pub_message_save() {
add_action( 'save_post', 'tsj_publicize_hashtags', 21 );
}
add_action( 'publish_post', 'tsj_cust_pub_message_save' );
}
Respond me if code works.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745260649a4619197.html
$custom_message = $content . ' ' . $hash_tags;
to$custom_message = get_the_permalink();
will resolve your problem. I will add answer with corrected code. – Serkan Algur Commented Aug 12, 2018 at 2:07