soflyy / wp-all-import-action-reference

115 stars 26 forks source link

Regarding limiting amount of posts to export #24

Closed MarcusFuto closed 6 years ago

MarcusFuto commented 6 years ago

I am exporting an XML feed of properties.

I want to limit the number of properties to 200. I asked support and they gave me this:

function my_export_csv_rows($articles, $options, $export_id)
{
    // change 1 to your real export ID
    if($export_id == "1"):
        // change -1 to the number of records you want to export, this will start from the highest post ID and work backward
        // -1 = 1 record exported, -50 = 50 records exported
        $articles = array_slice($articles, -1);

        endif;

        return $articles;

}
add_filter('wp_all_export_csv_rows', 'my_export_csv_rows', 10, 3);

However, I have read that wp_all_export_csv_rows is only for csv files. So I found this action reference for wp_all_export_xml_rows, but it seems to be structured totally differently.

I am not very good at php, but maybe some good hearted soul could help me out.

joeguilmette commented 6 years ago

Hey Marcus, I just checked on your support request - Cory is still discussing with our developer. I'll reply to you over there where we can continue this discussion.

MarcusFuto commented 6 years ago

Hi Joe,

Any update on this?

Thanks!

https://mailtrack.io/ Sent with Mailtrack https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality&

Marcus Fütö IMPROVE IT SOLUTIONS S.L Marketing Director

http://www.facebook.com/improvespain

2018-03-31 2:25 GMT+02:00 Joe Guilmette notifications@github.com:

Hey Marcus, I just checked on your support request - Cory is still discussing with our developer. I'll reply to you over there where we can continue this discussion.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/soflyy/wp-all-import-action-reference/issues/24#issuecomment-377651648, or mute the thread https://github.com/notifications/unsubscribe-auth/AJsrX1rNgf-aaG4pJ7yvUn511NST2nMzks5tjs0RgaJpZM4TAtzS .