Remove text from my Facebook posts

At first, I'm sorry for my english, I'll try to do my best because I'm Argentinian.I am using publicize t

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
  • Can you look at this answer. Similiar to your question. If you change some variables you can delete description or add more specific things. wordpress.stackexchange/a/226281/23042 – Serkan Algur Commented Aug 11, 2018 at 21:37
  • Thank you for your answer! I'm sorry but I don't understand :( should I paste thise code in my functions.php then my problem is solved? Thank you for your time! – Tincho Commented Aug 11, 2018 at 23:55
  • Answer's code add hashtags to content bu youcan change $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
Add a comment  | 

1 Answer 1

Reset to default 0

Remove 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

相关推荐

  • Remove text from my Facebook posts

    At first, I'm sorry for my english, I'll try to do my best because I'm Argentinian.I am using publicize t

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信