Forum Replies Created

Viewing 15 replies - 31 through 45 (of 234 total)
  • Plugin Author ServerPress

    (@serverpress)

    Hello divixmu,

    Thank you for your interest in WPSiteSync.

    There is a way you can do this. An action hook is called after WPSiteSync finishing updating a post on the Target. You can use this hook to modify the date:

    add_action(‘spectrom_sync_push_content’, ‘callback_function’, 10, 3);
    /*
    * @param $target_post_id int The Target’s post ID
    * @param $post_data Array The post data being updated
    * @param $response SyncApiResponse The response object for the current API call
    */
    function callback_function($target_post_id, $post_data, SyncApiResponse $response)
    {
    $new_post_date = strtotime($post_data[‘post_date’]);
    $new_post_date += 2 * 60 * 60;
    wp_update_post(array(
    ‘ID’ => $target_post_id,
    ‘post_date’ => date(‘Y-m-d H:i:s’, $new_post_date)
    ));
    }

    This example will add 2 hours to the post_date column, adjusting for instance from GMT-8 to GMT-6. If you need a different adjustment, you can add or subtract any other amount that you need.

    One thing to note: This is something that we will be handling automatically in the future. The Timezone setting on the Source site will be compared to the Timezone setting on the Target site and used to adjust the post_date and post_modified columns automatically. When this feature is enabled, your callback function will no longer be needed.

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hello, Sean Paul.

    Thank you for your interest in WPSiteSync!

    The WPSiteSync for Content plugin in the WordPress repository will synchronize posts, pages and standard taxonomies as supported by WordPress core. If you want to synchronize any Custom Post Types or Custom Taxonomies, you will need to use our add-on: WPSiteSync for Custom Post Types https://wpsitesync.com/downloads/wpsitesync-for-custom-post-types/

    We hope this answers your question. Please do let us know if we can help you further.

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hello Mike,

    We replied to your support inquiry yesterday (Tuesday). Sometimes we need a full day in order to respond to questions, especially on Mondays when we’re working through support questions that came in over the weekend. Thank you for your understanding.

    For others looking for similar answers, you asked about synchronizing content to multiple Target sites, as well as synchronizing comments.

    We do not currently support multiple Targets. This is something that we have on our Road Map and hope to have this feature soon. You can sign up for our newsletter at https://wpsitesync.com/ (bottom of page) to get new product announcements.

    Your six sites with comments synchronized between them sounds like a much more complex scenario than WPSiteSync is designed for.

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hi Kim Soler,

    I see a problem in your code. There is no “current post” context since the WPSiteSync’s Push operation happens essentially “outside the loop”. This means you need to provide a second parameter to the has_category() function. Pass it the $post_id as the second parameter so it knows which post you’re getting the categories from.

    You’re also not setting the new category for the post. You probably want to use something like wp_set_post_categories($post_id, $categories) for that.

    I hope that helps.

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hello Kim Soler,

    The code can go on both Source and Target. The action hook is only ever triggered on a Target site, after the Push operation is complete. So it only needs to be on the Target. It won’t do anything on the Source site.

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hello, Kim Soler.

    Thank you for your interest in WPSiteSync.

    Most of those action hooks are triggered when editing a Post in the admin, so I’m not surprised you’re not seeing those work.

    After processing, WPSiteSync does trigger its’ own hook and you can use that. It’s called ‘spectrom_sync_push_content’ and has three parameters:
    $target_post_id – the post ID that was updated
    $post_data – an array of data for the post. This does include all of the taxonomies for the post on the Source site. Or, you can get the terms using the $target_post_id
    $response – a SyncApiResponse object

    So you can use something like this:
    add_action( ‘spectrom_sync_push_content’, ‘my_callback’, 10, 3 );
    function my_callback( $post_id, $post_data, $response )
    {
    // do your work here
    }

    Hope that helps.

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hi cinza,

    Thanks for writing to us and letting us know about this error.

    The “Class ‘SyncAuthError’ not found” message makes me think there may be a missing file or some corruption in the install of WPSiteSync. Please try reinstalling the plugin and see if that helps.

    This is happening in a part of the code where it’s displaying an error – usually because the Authentication to the Target site has failed. Please make sure you are using a valid username and password from the Target site (not the Source site), and that the username has the capability to create/edit content, such as an Editor or Administrator. Using the correct credentials will bypass displaying this error and should allow you to authenticate properly.

    If you’re still having trouble, feel free to contact us and submit a support ticket at https://serverpress.com/contact/ – we can work with you more quickly there.

    All the Best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hello alenjohnthomas,

    There is no delete code since we’ve never implemented that feature. It’s not something we want to do.

    The tags and categories should be synchronized when you Push the Content. If that’s not happening, then I’d like to ask that you submit a support ticket at https://serverpress.com/contact/ so that we can look into the problem.

    If you need to assign a different user as the Author of the Content, we have a WPSiteSync for Authors add-on which does this for you. You can find out more about that here: https://wpsitesync.com/downloads/wpsitesync-for-authors/

    All the Best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hi alenjohnthomas,

    What you’re describing is a feature that we considered, but intentionally did not implement. Our goal is to synchronize content, not to delete anything. We felt that this feature could cause some confusion.

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hi alenjohnthomas,

    Thanks for writing to us. What are you deleting and what is the behavior you are expecting?

    Plugin Author ServerPress

    (@serverpress)

    Hello moacirsantana,

    Thank you for your interest in WPSiteSync.

    WPSiteSync does not create or change permalinks. It only synchronizes the content when you want to synchronize it.

    So you need to create the Content first. Once created, you can synchronize that one post or page to your other site.

    Please let us know if you have any other questions.

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hello quikned,

    Thanks for writing to us. I apologize that you’re having difficulties getting support. We provide support through our main corporate web site at https://serverpress.com/contact/ – Sorry for any confusion on that.

    The latest release version of WPSiteSync was last week and is available here in the WP repository. There is not more updated version than that. If you’re having trouble with that version we are happy to work with you to resolve those issues.

    Regarding the issues when pushing images, we would need to see log files from your Source and Target sites. The best way to provide those is by opening a support ticket at https://serverpress.com/contact/ and attach the log files. The Attachment metadata is automatically sync’d. So if there’s an issue with that, the log files will give the information we need to address that.

    The “different page template” message indicates that the theme you’re using on the Source site has a template file selected for the Page, and that template is not available for the theme that is configured for the Target site. However, this should only be a warning and not stop you from synchronizing the content. But if you’re using different themes, you might have some image sizes set up by the theme on the Source that are not set up on the Target and this is why the Attachment metadata is not correct. When we look at the log files we can see if that is the problem and come up with a solution for this.

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hi whanklee,

    So you want to change the category of the post once it gets to the Target site?

    That is not something that we do. Our goal is to synchronize the content as it is. We don’t change anything.

    We do provide a filter called ‘spectrom_sync_pre_push_content’ that you can use to modify the data before it is inserted. If you want to write a plugin, you can use that action hook to make the change to the category before it’s inserted.

    I hope that helps.

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hello whanklee,

    I want to make sure I understand what you are asking for. So let me restate this:

    Create a post on Source site with category ‘Playstation’. When you push Sync, you want posts from category ‘Playstation’ to go to Target A.

    Create a post on Source site with category ‘Xbox’. When you push Sync, you want posts from category ‘Xbox’ to go to Target B.

    Do I have that right? This feature is not currently supported. You can have only one Target site configured.

    We are working on a feature that will allow you to have multiple Target sites configured. With that, when you Push to Target, you will be able to select which site to Push to and it will save that information for that post. So this would not automatically select a Target based on a category, but for each post you can select which Target to send it to.

    If you would like to be notified when this feature is available, you can subscribe to our newsletter at https://wpsitesync.com/

    All the best,
    The ServerPress Team

    Plugin Author ServerPress

    (@serverpress)

    Hello whanklee,

    Thanks for writing to us. I’m not sure what you mean by “change the Target category.” Do you mean you want to change the Category assigned to a Post once it gets to the Target site? Could you give us a more detailed description of what you’re looking for? We’d love to help and provide you with the features that you need.

    All the best,
    The ServerPress Team

Viewing 15 replies - 31 through 45 (of 234 total)