• Resolved jeffvls

    (@jeffvls)


    I have a quick question. I’m using the WCE With Post Type (Add-on) to output a CSV of a specific custom post type. For some reason, when configuring the export, it doesn’t see any post-meta/custom fields for that specific post type and says “There are no registered custom fields.” However, it does seem to see post-meta/custom fields for other post types, like WooCommerce’s “Product”, “Coupon,” and other custom post types.

    What would cause post meta/custom fields to be available for CSV Export for one custom post type, but not for others?

    https://wordpress.org/plugins/wp-csv-exporter/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jeffvls

    (@jeffvls)

    OK, I figured out what was happening. The meta keys for all of the post-meta/custom fields were named with an underscore at the beginning of the meta key (for example
    “_city” instead of “city”). This is a method of creating “hidden custom fields” that WP ignores them in the back-end.

    Description:
    If you are a plugin or theme developer and you are planning to use custom fields to store parameters related to your plugin or template, it is interesting to note that WordPress will not show custom fields which have keys starting with an “_” (underscore) in the custom fields list on the post edit screen or when using the the_meta() template function. This can be for example used to show these custom fields in an unusual way by using the add_meta_box() function. For more info, see here: https://codex.wordpress.org/Function_Reference/add_post_meta#Hidden_Custom_Fields

    So my solution will be to look into seeing if its possible for us to rename our meta keys so that they are not using the underscore at the beginning.

    Thanks for the great plug-in!

    Thread Starter jeffvls

    (@jeffvls)

    Marking this ticket as resolved. It’s not an issue with the plug-in, but is based on how our theme/programming is set up.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WCE With Post Type (Add-on) – Not finding custom fields for a post type’ is closed to new replies.