這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

WP CSV Exporter

外掛說明

You can export posts in CSV format for each post type.
It is compatible with posts’ custom fields and custom taxonomies.
It is also possible to set the number or date range of posts to download.

How to customize export post data

This plugin has below filters.

  • wp_csv_exporter_post_name
  • wp_csv_exporter_post_title
  • wp_csv_exporter_post_content
  • wp_csv_exporter_post_excerpt
  • wp_csv_exporter_post_status
  • wp_csv_exporter_post_author
  • wp_csv_exporter_post_date
  • wp_csv_exporter_post_modified
  • wp_csv_exporter_thumbnail_url
  • wp_csv_exporter_post_tags
  • wp_csv_exporter_post_category
  • wp_csv_exporter_tax_{taxonomy}
  • wp_csv_exporter_{custom_field_key}

wp_csv_exporter_post_name

Parameters:

  • $post_name – (required) post slug
  • $post_id – (int) post id

Example:

add_filter( 'wp_csv_exporter_post_name', 'wp_csv_exporter_post_name_filter', 10, 3 );
function wp_csv_exporter_post_name_filter( $post_name, $post_id  ) {
    return $post_name;
}

wp_csv_exporter_post_title

Parameters:

  • $post_title – (required) post title
  • $post_id – (int) post id

Example:

add_filter( 'wp_csv_exporter_post_title', 'wp_csv_exporter_post_title_filter', 10, 3 );
function wp_csv_exporter_post_title_filter( $post_title, $post_id  ) {
    $post_title = $post_id . ':' . $post_title;
    return $post_title;
}

wp_csv_exporter_post_content

Parameters:

  • $post_content – (required) post content
  • $post_id – (int) post id

wp_csv_exporter_post_excerpt

Parameters:

  • $post_excerpt – (required) post excerpt
  • $post_id – (int) post id

wp_csv_exporter_post_status

Parameters:

  • $post_status – (required) post status
  • $post_id – (int) post id

wp_csv_exporter_post_author

Parameters:

  • $post_author – (required) post author
  • $post_id – (int) post id

wp_csv_exporter_post_date

Parameters:

  • $post_date – (required) post date
  • $post_id – (int) post id

wp_csv_exporter_post_modified

Parameters:

  • $post_modified – (required) post modified date
  • $post_id – (int) post id

wp_csv_exporter_post_thumbnail_url

Parameters:

  • $post_thumbnail_url – (required) post thumbnail_url
  • $post_id – (int) post id

wp_csv_exporter_post_tags

Parameters:

  • $post_tags – (array)(required) post tags
  • $post_id – (int) post id

Example:

add_filter( 'wp_csv_exporter_post_tags', 'wp_csv_exporter_post_tags_filter', 10, 3 );
function wp_csv_exporter_post_tags_filter( $post_tags, $post_id  ) {
    $_post_tags = array();
    foreach ( $post_tags as $key => $tag ) {
        $_post_tags[] = 'Tag:'.$tag;
    }
    return $_post_tags;
}

wp_csv_exporter_category

Parameters:

  • $category – (array)(required) post category
  • $post_id – (int) post id

Example:

add_filter( 'wp_csv_exporter_category', 'wp_csv_exporter_category_filter', 10, 3 );
function wp_csv_exporter_post_category_filter( $category, $post_id  ) {
    $_category = array();
    foreach ( $category as $key => $value ) {
        $_category[] = 'Category:'.$value;
    }
    return $_category;
}

wp_csv_exporter_tax_{taxonomy}

Parameters:

  • $term_values – (array)(required) post taxonomy
  • $post_id – (int) post id

Example: taxonomy = “dogs”

add_filter( 'wp_csv_exporter_tax_dogs', 'wp_csv_exporter_tax_dogs_filter', 10, 3 );
function wp_csv_exporter_tax_dogs_filter( $term_values, $post_id ) {
    $_term_values = array();
    foreach ( $term_values as $key => $term_value ) {
        $_term_values[] = 'Dog:'.$term_value;
    }
    return $_term_values;
}

wp_csv_exporter_{custom_field_key}

Parameters:

  • $field – (required) post custom field
  • $post_id – (int) post id

Example: custom field key = “price”

add_filter( 'wp_csv_exporter_price', 'wp_csv_exporter_price_filter', 10, 3 );
function wp_csv_exporter_price_filter( $field, $post_id ) {
    return 'Price:'.$field;
}

螢幕擷圖

  • /assets/screenshot-1.png

安裝方式

  1. Upload the entire wp-csv-exporter folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. The control panel of WP CSV Exporter is in ‘Tools > CSV Export’.

常見問題集

How to import CSV?

Maybe You should use “Really Simple CSV Importer” plugin.

使用者評論

2017 年 12 月 19 日
demands you buy a $10 extension to get the main feature. waste of time.
2017 年 8 月 24 日
The plugin clearly says "You can export posts in CSV format for each post type" in the first line of the description. Should say that you need to pay for such features...
2016 年 9 月 3 日
no choice in delimiter?? only 'comma'?? good luck with all the post_content full of commas then... and no use of text-brackets either? i am out
2016 年 9 月 3 日
PAID "Add-Ons will enable you to download CSVs for static pages and custom post types in addition to those for posts." This was not clear until after I installed the plugin.
2016 年 9 月 3 日
Exporting DB content can be tricky if your configuration is not standard. This plugin handled my situation with grace and speed. I Found the initial wording of the plugin to suggest that it did custom post types, only to be met with a prompt to purchase another plugin on my first attempt. I wanted to make an angry rating, but then I read more closely and it doesnt claim to do custom post types. So be aware, this DOES NOT DO CUSTOM POST TYPES, it does custom meta. If you can stand the few bucks to cover the additional cost to do those custom post types, the plugin works great.
閱讀全部 11 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈WP CSV Exporter〉的開發相關工作。

參與者

將〈WP CSV Exporter〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

2.0.0 – March 28, 2023
Fix: security update

1.3.7 – November 4, 2022
Fix: security update

1.3.1 – March 24, 2020
Add: save setting

1.2.2 – Sept 11, 2019
Add menu_order

1.1.3 – Oct 22, 2017
Fix download date

1.1.1 – Aug 7, 2016
Fix Use posts_tag

1.1.0 – Aug 1, 2016
Add offset feature

1.0.9 – Aug 1, 2015
Add Russian translate local.
Thanks! COMPAZ(https://profiles.wordpress.org/compaz/)

1.0.8 – May 11, 2015
fix Gumload link.

1.0.7 – April 10, 2015
Bug fix for taxsonomy empty

1.0.6 – April 7, 2015
Bug fix ‘wp_csv_exporter_{custom_field_key}’.

1.0.4 – February 9, 2015
Change to class file name.

1.0.3 – December 21, 2014
Bug fix.

1.0.0 – December 10, 2014
Initial release.