Site icon Ryadel

WordPress: re-enable Publicize for already published posts via Jetpack Publicize

Wordpress: condividere nuovamente gli articoli condivisi con Jetpack Publicize

If you use WordPress and you do not know the Jetpack plugin we can't help but recommend you to fill this huge gap by reading the excellent guide on sos-wp.it or, if you prefer, by directly going to the official Jetpack website. I'll just say that we're talking about a very powerful (and very useful) plugin that will empower your WordPress-enabled website with a lot of useful features, most of them identical to those available to WordPress.com paid accounts.

If you stumbled across this article is however likely that you know very well not only Jetpack but also one of its most interesting modules: I'm talking of Publicize, which gives us the power to automatically share our WordPress posts over the most popular Social Networks: needless to say that, in order to use such feature we need to link our Social accounts to our WordPress + Jetpack installation, allowing the latter to publish to the former ones while using our identity.

The plugin work perfectly and it's easy to configure. As soon as we activate it we'll be able to link all our social accounts through its configuration screen:

publicize-options

If we do this, every time we'll come to the point to publish a WordPress post we'll be able to also publish that using our linked Social Networks accounts - and also choose a custom text, hashtags and/or URL - using a handy Widget that will be added to those already present in the right column:

The only limitation so far is that Publicize module does not allow you to share already published posts. This restriction applies not only to the post published before installing Jetpack and activating Publicize, but also for any post already published and/or shared by it. This basically means that you only have a single chance to do it in the right way: if you forget an hashtag or do any mistake you won't be able to recover. The next time you'll try to edit an already-published post you'll see that the Publicize checkboxes of each linked Social Network will be unselected and disabled, making it impossible to select them again.

The solution

Fortunately the issue can be fixed with a simple workaround, provided you have access to the filesystem that hosts our WordPress website: that's because we'll need to apply a small code change to one of the .php module files. The file we need to edit is the following:

Open the file with a text editor and find the following line of code (usually around line 540, depending on the installed Jetpack version):

Immediately below this line you need to add the following:

This fix will disable the checks whether the current post has already been published or not. Once done, all you need to do to re-enable Publicize settings is to change the status of any post from Published to Draft and then click Update: as soon as the page reloads itself you'll be able to publish the post while specifying all the Publicize options you want to perform.

UPDATE: If you want to make Publicize to automatically add some hashtag to your posts without having to manually insert them every time, check out this plugin.

That's all for now. Happy coding!

 

Exit mobile version