Title: category_display parameter
Last modified: March 8, 2017

---

# category_display parameter

 *  Resolved [durhamm1](https://wordpress.org/support/users/durhamm1/)
 * (@durhamm1)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/category_display-parameter/)
 * I can add tags and categories to pages using the following code in my theme’s
   functions.php file:
 *     ```
       function add_taxonomies_to_pages() {
        register_taxonomy_for_object_type( 'post_tag', 'page' );
        register_taxonomy_for_object_type( 'category', 'page' );
        }
       add_action( 'init', 'add_taxonomies_to_pages' );
       ```
   
 * I can then use `[display-posts category="test" post_type="page"]` to list all
   pages in the test category.
 * However, I cannot add `[display-posts category_display="true"]` to a page in 
   the test category and get it to display anything (unless I also add a _post_ 
   to the test category.)
 * Any help would be much appreciated.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/category_display-parameter/#post-9020516)
 * The issue is you have not included your post type parameter in the second shortcode,
   so it is defaulting to the ‘post’ post type.
 * Change that to `[display-posts post_type="page" category_display="true"]` and
   it will work.

Viewing 1 replies (of 1 total)

The topic ‘category_display parameter’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/category_display-parameter/#post-9020516)
 * Status: resolved