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’ );
Thanks for that, Victor. Is there any way to remove the finger pointing icon and hyphen after the title?
@mcgregormedia Thanks for perfect question at perfect time. I also want to know the same
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’ );
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.
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 );
Thank you so much guys for solving this issue
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
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