Title: custom post types
Last modified: August 21, 2016

---

# custom post types

 *  Resolved [vmallder](https://wordpress.org/support/users/vmallder/)
 * (@vmallder)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-post-types-113/)
 * Hello,
    I need to use this plugin with a specific custom post type. I noticed
   in a recent post on this forum you stated that the plugin does not work with 
   custom post types.
 * I have been looking through all of your code and I can’t figure out WHY it does
   not work with custom post types. I cannot find any code that restricts it to 
   work with post_type = ‘post’ only. Can you help me figure out where this is happening
   so that I can try to change it so that it works for my custom post type?
 * Thank you for your help!
 * [http://wordpress.org/plugins/wp-print/](http://wordpress.org/plugins/wp-print/)

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

 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-post-types-113/#post-4542690)
 * At the moment, it does not support custom post type.
 * It is not as simple as it seems to be because of the rewrite rules. I am still
   trying to figure that out.
 * The magic lines in [https://github.com/lesterchan/wp-print/blob/master/wp-print.php#L49](https://github.com/lesterchan/wp-print/blob/master/wp-print.php#L49)
   and after.
 *  [capsx](https://wordpress.org/support/users/capsx/)
 * (@capsx)
 * [12 years ago](https://wordpress.org/support/topic/custom-post-types-113/#post-4542938)
 * 1. copy print-posts.php to the template directory
    2. change:
 *     ```
       global $text_direction;
       ```
   
 * to
 *     ```
       global $text_direction, $wp_query;
       $args = array_merge( $wp_query->query_vars, array( 'post_type' => 'any' ) );
       query_posts( $args );
       ```
   
 * 😉
 *  [nimmolo](https://wordpress.org/support/users/nimmolo/)
 * (@nimmolo)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-post-types-113/#post-4542943)
 * thanks capsx –
 * that didn’t work for my custom post type though. 🙁
 * my custom post type is hierarchical, like pages – not sure if that matters
 *  [nimmolo](https://wordpress.org/support/users/nimmolo/)
 * (@nimmolo)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-post-types-113/#post-4542944)
 * Hi Lester,
    I’ve been looking into wp_rewrite. It looks like your plugin uses
   rewrite endpoints, but only for posts and pages. It seems adding endpoints to
   custom post types has been an issue in the past, check out this post.
 * [Unable to add Endpoints to custom post_types](https://core.trac.wordpress.org/ticket/12605)
 * Update: maybe this is not the issue, my cpt is set to use ‘permalink_epmask’ 
   => EP_PERMALINK so it should be using that constant.
 * Maybe wp-print.php needs to get post types and loop through them to do special
   rewrite rules for each?
 *  [Alternatewords](https://wordpress.org/support/users/alternatewords/)
 * (@alternatewords)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/custom-post-types-113/#post-4542948)
 * I just ran into the same issue on our ecourse site, which uses custom posts based
   on student level. I actually found a solution here on the forums, specifically
   this post: [http://wordpress.org/support/topic/plugin-wp-print-custom-post-types-print?replies=7#post-2081865](http://wordpress.org/support/topic/plugin-wp-print-custom-post-types-print?replies=7#post-2081865).
   Worked perfectly fine for me.
 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/custom-post-types-113/#post-4542949)
 * The dev version [https://github.com/lesterchan/wp-print/archive/master.zip](https://github.com/lesterchan/wp-print/archive/master.zip)
   will work with Custom Post Type =)

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

The topic ‘custom post types’ is closed to new replies.

 * ![](https://ps.w.org/wp-print/assets/icon.svg?rev=978022)
 * [WP-Print](https://wordpress.org/plugins/wp-print/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-print/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-print/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-print/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-print/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-print/reviews/)

 * 6 replies
 * 5 participants
 * Last reply from: [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/custom-post-types-113/#post-4542949)
 * Status: resolved