Title: [Plugin: Content Types] WP_Query and custom fields?
Last modified: August 19, 2016

---

# [Plugin: Content Types] WP_Query and custom fields?

 *  Resolved [Drivetrain](https://wordpress.org/support/users/drivetrain/)
 * (@drivetrain)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-content-types-wp_query-and-custom-fields/)
 * Is there a way to specify custom content type fields in the arguments passed 
   to WP_Query() aka query_posts()? E.g:
 * $args = array( ‘post_type’ => ‘asset’, ‘posts_per_page’ => -1 );
    $loop = new
   WP_Query( $args ); etc.
 * I’d like to be able to use custom fields in WHERE and ORDER BY clauses without
   writing custom SQL directly. Thanks!
 * [http://wordpress.org/extend/plugins/content-types-wordpress-plugin/](http://wordpress.org/extend/plugins/content-types-wordpress-plugin/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Brian S. Reed](https://wordpress.org/support/users/iambriansreed/)
 * (@iambriansreed)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-content-types-wp_query-and-custom-fields/#post-1941056)
 * I am doing that on my site.
 * I have a content type called projects and I created a loop of that content type
   on the projects page template:
    [http://scottreeddesign.com/projects](http://scottreeddesign.com/projects)
 * The post_type is the slug of your singular name.
    Does that make sense?
 *  Plugin Author [Brian S. Reed](https://wordpress.org/support/users/iambriansreed/)
 * (@iambriansreed)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-content-types-wp_query-and-custom-fields/#post-1941057)
 * The next version will allow you to see the content types slug and define it when
   creating the content type.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Content Types] WP_Query and custom fields?’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/content-types-wordpress-plugin.svg)
 * [Content Types](https://wordpress.org/plugins/content-types-wordpress-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-types-wordpress-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-types-wordpress-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/content-types-wordpress-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-types-wordpress-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-types-wordpress-plugin/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Brian S. Reed](https://wordpress.org/support/users/iambriansreed/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-content-types-wp_query-and-custom-fields/#post-1941057)
 * Status: resolved