WordPress: Add hashtags to Jetpack Publicize shared posts

Wordpress: Aggiungere hashtag ai social post inviati con Jetpack Publicize

I already wrote a post about Publicize, the wonderful Jetpack module which allows any wordpress editor to share custom messages about their published posts over most Social Networks like Twitter, Facebook, Google Plus and the like. Needless to say, the magic will only happen if the WordPress Blog have one or more social accounts and connected them properly by following this brief guide, which is summarized by the following screen:

publicize-options

Once the setup is complete, Publicize will automatically fill in the text to send to your Social Network by entering the title of our article in the Custom Message box contained in its own widget to the right side of the insert/edit post page: if we're not happy with the title, we're also free to edit the default content according to our needs.

publish-meta-publicize-expanded-38-2

This handy feature is a godsend for most bloggers, to the point that Publicize is without a doubt one of the most useful modules of the whole Jetpack suite. Even if the plugin is awesome, we could still notice some minor flaws: for example, we could say that, at least with the current build, its configuration options are still pretty sparse. There's no way to automatically insert hashtags, maybe using the post user-defined tags or by parsing another custom field: this would be an extremely handy feature, to the point that it's already offered by many plugins dealing with auto-social publishing including the excellent Revive Old Post - which I'm eager to review in an upcoming article.

In order to fill this specific gap I created a small plugin that does exactly that. It goes by the name of...

Publicize With Hashtags

Using the plugin is quite simple: once installed, the post tags with will be converted into hashtags and then appended to the Publicize Widget's Custom Message box after each command implying Save Post. The result would be just like this:

publicize-with-hashtags-example-01

As said, the plugin will do its job each time you save the post: meaning that the hashtags will automatically appear when you'll use any command such as save as draft, update, publish, edit or other similar commands. he plugin also includes a dupe-check feature to prevent duplicate hashtags, so you won't have to worry about the same hashtag being added more than once.

publicize-with-hashtags-logo

Main Features

  • Hashtags are created by picking the manually-assigned post tags, removing any spaces.
  • The author/editor will still be able to manually insert one or more custom hashtags, exactly like before: any automatic hashtag - if not already added - will be appended after them.
  • Hashtags can be reordered at will, regardless of how they were added (manually or automatically).
  • The plugin features a dupe-check, ensuring that the same hashtag won't be added multiple times.
  • The plugin will automatically check the Custom Message character length size in order to ensure it doesn't exceed a certain number of characters (118 by default). This number can be also manually changed or set to zero in order to shut-down the max-length check entirely.

Installing the plugin

The plugin is completely free and has been released under the GPL v. 2.0 license: you can download and/or install the latest version by visiting the Plugin's page in the WordPress Plugin Browser.

Source Code

If you are interested in to take a look at the plugin's source code or you want to make your very own custom build, you can review the Publicize With Hashtags v0.1.2 source code with full developer's comments: feel free to use it as you like.

You can also check out the latest version at GitHub.

If you chose to go with your own build, you can install it by following this great guide to functionality plugins by Eric Dye or through the handy Functionality Plugin developed by Shea Bunge.

Useful Links




WordPress: Add hashtags to Jetpack Publicize shared posts

About Ryan

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies. Microsoft MVP for Development Technologies since 2018.

View all posts by Ryan

10 Comments on “WordPress: Add hashtags to Jetpack Publicize shared posts”

  1. Pingback: WordPress: reactivate Publicize for already published posts
  2. Thanks for this plugin. I’m trying to change the message to have the content instead of the title.
    I changed $mess = $p->post_title to $mess = $p->post_content but this isn’t working. Any ideas please?

  3. Pingback: Jetpack auto tweet post with custom message and hash tag | Play with Stuff Easily
  4. I am using Joomla for my website, which is where my blog is located as well, so I am not using even one of the plug-ins you mentioned here. There are a number of plug-ins that I would love to use though, in time…when I have my own WordPress blog

  5. ‘Publicize With Hashtags’ plugin tags that automatically become hashtags in publicize only apply to posts, how do I make them apply to custom posts too? thanks

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.