WordPress – Jetpack post already published posts via Publicize 2019

Jetpack (a highly recommended plugin provided by Automattic) has many great features but the one that we find ourselves promoting the most is it’s Publicize feature. This feature lets you automatically push your posts to Twitter, Facebook, etc. when Publishing that post to your blog. This is a great feature that can same you or your team a ton of time – relieving you from having to manually post this content on each social platform.

Once the plugin is activated, you’ll see the ability to easily connect all your social accounts. Once connected, all additional posts that you Publish will now give you the option to also post these to each social platform.

That’s nice and all but what happens if you already have a large number of posts that you’d like to backfill to your various social accounts? Well you’re in luck, the walkthrough below will explain the edit that’s needed in order to allow Jetpack’s Publicize feature to also allow for this.

In previous versions of WordPress this was solved a bit differently. The Jetpack module was updated recently for the WordPress 5.0 update which introduced the “Blocks” post composition functionality. Looking in Jetpack’s documentation:

https://jetpack.com/support/publicize/

You’ll see a “Publicize in the Block Editor” section which is how we figured there must be a new way for the code to be handling things. Turns out there’s a function called “post_is_done_sharing” on line 394 in wp-content/plugins/jetpack/modules/publicize/publicize-jetpack.php:

The second half of the return statement checks to see if the post has ever been published before. Changing it from:

return 'publish' == $post->post_status || get_post_meta( $post->ID, $this->POST_DONE . 'all', true );

to

return 'publish' == $post->post_status;

Allows the post to be set back to draft and republished again just like the original article says.

And that should do it! Let us know if this helps of if you’ve found an alternative solution.

Previous Article

0 Comments

  1. In recent decades, online casinos have become an integral part of the entertainment industry, giving players the opportunity to enjoy playing for money right from the coziness own home. this virtual world of ardor connects within itself interesting games, unlimited choice and the opportunity to win large sums of funds , creating an exciting experience for lovers of gambling entertainment.
    Variety of games

    On-line casinos offer a wide range of of games, satisfying the tastes of the most different players. Fans conventional card games can enjoy variations of blackjack, poker and baccarat. Slot machine lovers will find hundreds of exciting gaming slots with different themes and bonus fun. Roulette, dice, keno and other gambling are also becoming available in on-line format.
    Bonuses and Promotions

    On-line casinos attract players fastest withdrawal online casinos ghana not only variety of games, but also generous bonuses. Many platforms make a great offer welcome bonuses for new players, including free spins on game slots, additional funds for betting or even no deposit bonuses. Regular promotions and loyalty programs keep the casino interested and motivate players to come back again and again.
    Safety and Reliability

    One of the key aspects of an on-line casino is to provide a safe and secure gaming experience. Licensed casinos use leading technologies encryption to protect of players’ proprietary and financial information. This creates a trusted environment where players can enjoy fervor knowing that their data is safe.

Leave a Reply

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