Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author johnh10

    (@johnh10)

    Some plugins, like the Google+ publicize module in Jetpack, have code to ensure published posts aren’t sent more than once.

    Any workaround for this? I have the same problem with SNAP, and the devs there just ignore me.

    Plugin Author johnh10

    (@johnh10)

    Hello,
    I’m leery of supporting changes to other people’s plugins, but it seems the specific code you need to change for SNAP is found in

    NextScripts_SNAP.php:

    if (!function_exists("nxs_snapLogPublishTo")) { function nxs_snapLogPublishTo( $new_status, $old_status, $post ) { clean_post_cache( $post->ID );
      if ( $old_status!='publish' && $old_status!='trash' && $new_status == 'publish' ) { nxs_addToLogN('BG', "*** ID: {$post->ID}, Type: {$post->post_type}", '', ' Status Changed: '."{$old_status}_to_{$new_status}".'. Autopost requested.');
        nxs_snapPublishTo($post);
      }
    }}

    What *I* would do is add the following code to my theme’s functions.php file:

    if (!function_exists("nxs_snapLogPublishTo")) { function nxs_snapLogPublishTo( $new_status, $old_status, $post ) { clean_post_cache( $post->ID );
      if ( $old_status!='trash' && $new_status == 'publish' ) { nxs_addToLogN('BG', "*** ID: {$post->ID}, Type: {$post->post_type}", '', ' Status Changed: '."{$old_status}_to_{$new_status}".'. Autopost requested.');
        nxs_snapPublishTo($post);
      }
    }}

    and test.

    Awesome. I’ll create some test subdomains and test it on those later.

    I didn’t have any luck with the code above, but I found a different workaround that works well:

    Create a subdomain, and install & configure JetPack Publicize or SNAP.
    Install a feed-grabber plugin such as WPeMatico and configure it to grab the feed from your main domain. What happens now is when your main domain recycles the already published posts, the feed grabber publishes those posts on your subdomain, and Publicize/SNAP will post them where you want as if they were new posts.

    You can also configure WPeMatico/whatever feed grabber you use to instantly turn the new feeds into drafts, & install APS on the subdomain & configure it to turn those drafts into posts as needed. By doing this, you can use multiple schedules- your main website making posts once per hour all throughout the day, while your subdomain then publishes all those posts to Google+ from 3PM-6PM the next day, etc.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Jetpack Publicize’ is closed to new replies.