Site icon Ryadel

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.

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:

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.

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




Exit mobile version