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 and after.
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 );
😉
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
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
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?
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://ww.wp.xz.cn/support/topic/plugin-wp-print-custom-post-types-print?replies=7#post-2081865. Worked perfectly fine for me.