WordPress.org

Ready to get started?Download WordPress

Forums

Exports and Reports
[resolved] Custom Fields of Custom Post Type (2 posts)

  1. Burke Ingraffia
    Member
    Posted 1 year ago #

    Could you please provide me a query of a template to create a report of custom post types with custom fields?

    http://wordpress.org/extend/plugins/exports-and-reports/

  2. Scott Kingsley Clark
    Member
    Plugin Author

    Posted 10 months ago #

    Two reports ship with the plugin, one for Posts, one for Pages. Reporting custom fields in general can be difficult since there are variable amounts of custom fields and the database returns a big list of them instead of column-based like this plugin expects for it's MySQL queries.

    So you'd want to do a SELECT on your posts table, then do a JOIN for the postmeta table on the meta_key for each custom field, then alias each of those JOINed table meta_value columns in your SELECT for usage in the report.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.