Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Freitas Victor

    (@victorfreitas)

    Hello mcgregormedia,

    you can change the text through the filters ‘wpusb-twitter-before’ and ‘wpusb-twitter-after’, to filter before and after the title.

    Example:
    function example_callback( $text ) {

    $new_text = ‘example’;

    return $new_text;
    }
    add_filter( ‘wpusb-twitter-after’, ‘example_callback’ );

    Thread Starter mcgregormedia

    (@mcgregormedia)

    Thanks for that, Victor. Is there any way to remove the finger pointing icon and hyphen after the title?

    imran110ali

    (@imran110ali)

    @mcgregormedia Thanks for perfect question at perfect time. I also want to know the same

    Plugin Author Freitas Victor

    (@victorfreitas)

    Hello, this character can be removed through the filter “wpusb-caracter”. Soon I will be making some changes to improve this interaction.

    function example_callback( $caracter ) {
    return ”;
    }
    add_filter( ‘wpusb-caracter’, ‘example_callback’ );

    Thread Starter mcgregormedia

    (@mcgregormedia)

    Thanks Victor! However that still leaves the hyphen and there are now a number of spaces between the title and the URL.

    It also adds an extra space at the end of the title, before the closing quotation mark.

    Plugin Author Freitas Victor

    (@victorfreitas)

    I made the bugfix is in version 2.8.2. Now has a new filter that can be used for all the text. Thank you for feedback, helped a lot!

    Example:
    function example_callback( $text, $title ) {
    return $title;
    }
    add_filter( ‘wpusb-twitter-text’, ‘example_callback’, 10, 2 );

    imran110ali

    (@imran110ali)

    Thank you so much guys for solving this issue

    Thread Starter mcgregormedia

    (@mcgregormedia)

    Thanks Victor, that’s great.

    Hi Victor, I need the twitter, linkedin and email share buttons to take the Meta title, not the post title. With facebook it works, but not with twitter. Facebook takes the content that I put in WP Meta SEO Meta Title automatically, and I need twitter and other to do the same. Is it possible?
    Thanks

    Plugin Author Freitas Victor

    (@victorfreitas)

    Hello pineromira, the current version of the plugin can not change the title through the settings. You will have to do through filters.

    Example:

    function filter_share_title( $arguments ) {
    $post_id = intval( get_the_ID() );
    $meta_title = get_post_meta( $post_id, ‘_metaseo_metatitle’, true );

    if ( ! empty( $meta_title ) )
    $arguments[‘title’] = esc_attr( $meta_title );

    return $arguments;
    }
    add_filter( ‘wpusbarguments’, ‘filter_share_title’ );

    Thanks for your response, but I don’t know where to put this code. In core.php? I write the code there but the last line gives me a syntax error. Sorry but I’m not programmer.
    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Twitter share text’ is closed to new replies.