Autoshare for Twitter

Automatically tweets the post title or custom message and a link to the post.

Autoshare for Twitter automatically tweets your posts as soon as they’re published. Once you hit the Publish button, the plugin sends your post’s title, featured image, and link to Twitter, along with a custom message.

Unlike a myriad of other social media, multitool solutions, Autoshare for Twitter is built solely for Twitter. It focuses on doing one thing and does it well, with the code and interface craftsmanship we apply to every project.

With Autoshare for Twitter, developers can further customize nearly everything about the tweets, including the image, author, and link, using an extensive set of hooks built into the code. Among its other features, the WordPress plugin:

  • Works in both the classic and new block editors.
  • Becomes part of the pre-publish checklist step that’s part of the new block editor.
  • Posts a high-quality featured image with your tweet.
  • Counts characters to keep you under the tweet limit.
  • Adds a link to the tweet in the block editor sidebar.

Disclaimer: TWITTER, TWEET, RETWEET and the Twitter logo are trademarks of Twitter, Inc. or its affiliates.

Plugin Compatibility


When using with 10up’s Distributor plugin, posts that are distributed will not be autoshared if they are already tweeted from the origin site. Autoshare for Twitter tracks posts that have been tweeted in post meta to avoid “double tweeting”. To avoid this behavior, use the dt_blacklisted_meta filter to exclude the ‘autoshare_for_twitter_status’ meta value from being distributed :

add_filter( 'dt_blacklisted_meta', function( $blacklisted_metas ) {
    $blacklisted_metas[] = 'autoshare_for_twitter_status';
    return $blacklisted_metas;
} )


Note: Posts and pages are supported by default. Developers can use the autoshare_for_twitter_default_post_types filter to change the default supported post types

Custom post types can now be opted into autoshare features like so:

function opt_my_cpt_into_autoshare() {
    add_post_type_support( 'my-cpt', 'autoshare-for-twitter' );
add_action( 'init', 'opt_my_cpt_into_autoshare' );

In addition, adding support while registering custom post types also works. Post types are automatically set to autoshare. Future versions of this plugin could allow this to be set manually.

While the autoshare feature can be opted into for post types using the above filter, by default the editor still has to manually enable autoshare during the post prepublish flow. The autoshare_for_twitter_enabled_default filter allows autoshare to be enabled by default for all posts of a given post type. Editors can still manually uncheck the option during the publishing flow.


function enable_autoshare_by_default_for_core_post_type( $enabled, $post_type ) {
    if ( 'post' === $post_type ) {
        return true;

    return $enabled;
add_filter( 'autoshare_for_twitter_enabled_default', 'enable_autoshare_by_default_for_core_post_type', 10, 2 );

Additional technical details can be found in our GitHub repository.

Create post screen with Autoshare for Twitter options.

Published post screen with Autoshare for Twitter options.

Autoshare For Twitter sidebar panel.

Autoshare for Twitter Settings, found under <code>Settings</code> > <code>Autoshare for Twitter</code>.

  • Rating
  • Requires 5.7+
  • Downloads 9,207
  • Updated 2023-08-22

Leave a Comment

Finely crafted websites & tools that make the web better.