Support » Plugin: Jetpack by WordPress.com » Enable Publicize for old posts

  • Resolved Mexxxi

    (@mexxxi)


    Hi,

    I know that Publicize doesn’t support already published posts, but that is exactly what I need. I found out that it apparently checks the post date and if it’s still nulled then it actually works for already published posts.

    However, it would be bad practice to manipulate the whole database just to enable this feat. Is there a way to remove the date check and enable the function permanently? I checked out the phps, but couldn’t find anything useful there.

    I’m pretty sure I’m not the only one looking for such a solution. This comes in handy especially if you add a social media site to publicize at a much later point. Thanks in advance 🙂

    https://wordpress.org/plugins/jetpack/

Viewing 14 replies - 1 through 14 (of 14 total)
  • By now I managed to modify the plugin to allow me to publicize already written posts.

    I understand why you wouldn’t want to allow to replublicize already publicized posts, but if I decide a year from now to use Google+, I don’t want to start out with an empty page while sitting on a nicely filled blog.

    Plugin Contributor Brandon Kraft

    (@kraftbj)

    Happiness Engineer

    Howdy,

    Glad you’re all set. Your situation makes sense and we’ll take it under consideration.

    Cheers!

    Thank you for your reply.

    I’m pretty sure that many people would appreciate it if Publicize wasn’t that restrictive, especially seeing that WordPress VIP offers a code snippet to its users that allows them to republicize without much hassle with the press of a button.

    Keep up the good work 🙂

    jlaks

    (@jlaks)

    Hi Mexxxi,

    Could you share what php you added to allow for Publicizing Old Posts. I have similar problem that you had. I have tried adding the snippet of code from WordPress VIP to theme function. Re-Publicize check box is showing in my posts but when checked to Re-Publicize (old post) nothing happens.

    Thanks in Advance

    Hi Mexxi,

    I’m having the same issue with publicize. If you don’t mind, would you share with us mere mortals what you did to allow for publicizing old posts?

    Many thanks

    Hey guys,

    sure I can share my modification. Go to wp-content/plugins/jetpack/modules/publicize/ui.php.

    Comment out:

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

    and place the following line below it:

    $all_done = false;

    Now comment out:

    $service_id_done = (array) get_post_meta( $post->ID, $this->publicize->POST_SERVICE_DONE, true );

    And insert the following line below it:

    $service_id_done = false;

    This will disable the checks whether a post has already been published.
    The publicize checkboxes in already existing articles will become clickable again. However, to publicize already published posts, you’ll need to change the status of your article to “Draft”, save it (better reload the page) and then you’ll be able to publicize the article. You can rinse and repeat as much as you like.

    This is a dirty solution though. It takes quite a while to publicize older articles this way, so this is only helpful if you publish each article to a bunch of social networks. Otherwise you might be faster posting each article manually to the social networking website of your choice. Also, be aware that your changes to ui.php will be overwritten with the next jetpack update, so if you want to keep this functionality, you’d have to incorporate the changes with functions.php of your (child) theme.

    Thanks again Mexxxi! Worked great :).

    You’re welcome 🙂

    Hi Mexxxi,

    Finally had a opportunity to try the code. As the same with WalkingShoes, it worked perfectly.

    Was in contact with Jeremy @ Jetpack about this. He said to keep an eye out for the feature to be added in an upcoming release. Not sure if it will be a toggle type feature or adding some code to functions.php that is similar to WorpPress VIP’s work around that doesn’t work anymore with latest JetPack releases.

    Either way thank you for following up and sharing your work around. Definitely a HUGE HELP!!!

    Hi jlaks,

    thanks for the heads up. Jeremy already commented on this issue in another thread months ago. This is no feature that needs to be added since Jetpack is already fully capable of publishing posts to social networking sites.

    All they need to do is to remove the two simple checks. The fact that they implemented them in the first place is a clear sign that they don’t want Jetpack to behave in a different way, so why would they remove them? Plenty of people have complained about this over the last months and nobody cared to remove those checks.

    So I wouldn’t hold my horses for that in the future, let alone expect a more varied implementation that gives the user more control over publishing old posts, or even mass publishing.

    Hey Mexxxi,

    Really appreciate you posting this modification, worked like a charm to enable the check boxes, however I tried to re-post following your suggestion of changing it to Draft and clicking OK…but no go. Am I missing something obvious?

    Thanks

    Hey shippy,

    so you’re able to click the checkboxes and re-publish the article, but no posts are being generated on your social networking sites? I experienced this problem a few times with the vanilla version of Jetpack, so you should try it more than once (in case you haven’t) just in case the problem is on Jetpack’s end. In any case, you should reload/re-open the page after setting it to draft and saving it. So it should be loaded as a draft, then the rest should work as expected.

    If this doesn’t work then I’m at a loss. Could be that you have made some modifications or other may be other plugins interfere. You’re using the most recent version of Jetpack, don’t you?

    Thanks for the suggestions Mexxxi…. but still no luck.

    It’s a pretty simple blog with no customization so there must be something in play here.

    On a positive note it’s also a new blog so there weren’t many posts to get onto FB… thanks for your help.

    Sorry that it didn’t work. There are probably a few more variables that need to be force fed some values. Unfortunately, I can’t do anything about that.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Enable Publicize for old posts’ is closed to new replies.