
By using this plugin, you can share content like images, media, URLs and text directly to your WordPress site from a capable device and browser. For example, you can share a photo that you just took on your phone to your WordPress site in the same way that you would otherwise share it with your friends in a native messaging app.
When you share content to your WordPress site using this plugin, it will automatically start a new block editor draft post with it; you can then just add anything else you like, or immediately publish it as is. For certain use-cases, e.g. an image blog, creating a post with the shared image might be everything that’s needed before publishing right away!
To name a few other examples of what you can share to your WordPress site using this plugin, think about audio and video files, short text notes, Spotify playlists – basically anything that you can share from an app on your phone you can now also share directly to your WordPress site.
In order to use this plugin, you will also need to install and activate the PWA plugin, which provides the basic infrastructure for your site to become a PWA.
With both plugins active, once you visit your site on a capable device and browser, you should see a prompt (via the PWA plugin’s functionality) to add the plugin to your home screen (e.g. similar to an app on your phone).
Once you have added your website to the home screen of your device, it should be available as a target when sharing any content from that device, e.g. a photo or a URL.
When you share something to your WordPress site, the installed PWA of your website should open. You should then (potentially after logging in) land directly on a new post in the block editor where the shared content has already been added. If you are sharing a media file (e.g. an image or video file), it will be automatically added to your site’s media library.
This plugin is powered by the Web Share Target API. The Web Share Target API is a modern browser API which allows sharing images, media, URLs and basic text content directly to your website, relying on the regular sharing UI that is for example integrated in your phone. See here for more technical background information about the Web Share Target API.
The Share Target plugin allows other plugins to integrate with it. You can customize what should happen with incoming shared content when it arrives in the block editor, conditionally overriding the default behavior of the plugin.
In PHP, enqueue your custom JavaScript file. Make sure to include the share-target script in its dependencies. For example:
wp_enqueue_script( 'my-share-target-handler', '/assets/js/my-share-target-handler.js', array( 'share-target' ) );
In your JavaScript file you can then add your custom share handler using the following function:
wp.shareTarget.registerShareHandler( options )
Registers a new share handler for incoming shared data.
Parameters:
The following example handles any shared Spotify content and embeds it into the post:
// Matches a shared Spotify URL. const spotifyRegex = /^https:\/\/open\.spotify\.com/; wp.shareTarget.registerShareHandler( { handle: async ( { link, attachment } ) => { // Do not handle if a media file is being shared. if ( attachment ) { return false; } // If a shared Spotify URL, embed it. if ( link && link.match( spotifyRegex ) ) { wp.data.dispatch( 'core/block-editor' ).insertBlocks( [ wp.blocks.createBlock( 'core/embed', { url: link, type: 'rich', providerNameSlug: 'spotify', responsive: true, } ), ] ); return true; } // Otherwise fall back to other handlers. return false; }, priority: 5, } ); Starting from $0 per month.
Rating
Reviewers
No reviews
Tags
Developed By
Felix Arntz
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Add a logo slider to your site to showcase clients and partners, strengthen brand credibility, and build trust with new visitors.
Show TikTok videos with a TikTok carousel that arranges clips in a smooth, customizable layout to boost engagement and keep visitors watching.
Display discounts with a coupon bar that highlights special offers, drives urgency, and helps convert visitors into paying customers.
Showcase visuals with an image slider that displays multiple images in a smooth slideshow, improves design, and keeps visitors engaged.
Show your team with interactive team member flip cards that build trust, support transparency, and help visitors connect with the people behind your brand.
Capture email leads with an email subscription form that collects addresses, saves entries, sends notifications, and helps grow your audience.

Show fresh content from any source with an RSS feed that keeps your site updated, improves navigation, and boosts user engagement.
Add a countdown bar to your site to create urgency, highlight limited time offers, and drive faster engagement and higher conversions.
Add interactive two-sided cards with flip effects to present front and back content in a compact, engaging format.
Showcase your abilities with a structured skill list that highlights strengths clearly, builds credibility, and improves your chances of getting hired.
Encourage interaction with social votes that let visitors like, upvote, and rank content, boosting engagement and guiding better decisions.
Show Vimeo videos with a Vimeo slider that displays clips in a smooth slider to boost engagement and keep visitors watching.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
