Drivetrain
Member
Posted 2 years ago #
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/
iambriansreed
Member
Plugin Author
Posted 2 years ago #
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
The post_type is the slug of your singular name.
Does that make sense?
iambriansreed
Member
Plugin Author
Posted 2 years ago #
The next version will allow you to see the content types slug and define it when creating the content type.