Title: Outputting these custom posts using PHP
Last modified: August 20, 2016

---

# Outputting these custom posts using PHP

 *  [JonRTW](https://wordpress.org/support/users/jonrtw/)
 * (@jonrtw)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/outputting-these-custom-posts-using-php/)
 * Hi,
 * I’m using the snippet given in your FAQ page. I’m trying to add categories to
   the query using categories the custom posts have been associated with. Unfortunately,
   I am not able to make it only output the posts I want, rather it outputs everything
   under that custom type. The query string I’m using is:
    `'posts_per_page' => 
   10, 'category' => '6', 'order'=> 'ASC', 'orderby' => 'title'`
 * Can you tell me where I’m going wrong?
    Thanks.
 * [http://wordpress.org/extend/plugins/custom-post-type-creator/](http://wordpress.org/extend/plugins/custom-post-type-creator/)

The topic ‘Outputting these custom posts using PHP’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-post-type-creator.svg)
 * [Custom Post Type Creator](https://wordpress.org/plugins/custom-post-type-creator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-creator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-creator/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-creator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-creator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-creator/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [JonRTW](https://wordpress.org/support/users/jonrtw/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/outputting-these-custom-posts-using-php/)
 * Status: not resolved