How can I force custom post type to use a specific template?

If your newsletters are a custom post type you can create a template dedicated for it using the template hierarchy. Template for a single page would be.. single-{custom-post-type-name}.php Template for an archive page would be.. archive-{custom-post-type-name}.php These templates get automatically selected you don’t need to add them to a page template attribute in the editor.

How to enable a custom post type to custom user role in WordPress

I don’t think the plugin adds the capabilities you are using in add_cap while registering the post type. You can modify the registered post type by adding code to themes functions.php file. You can do something like this. /** * Overwrite args of custom post type registered by plugin */ add_filter( ‘register_post_type_args’, ‘change_capabilities_of_course_document’ , 10, … Read more

Custom post type archive page not working

Your post type, courses, has a rewrite slug of course. So your archive template will be archive-course.php. Your taxonomy, courses_category, has a rewrite slug of course, so your taxonomy archive template will be taxonomy-courses.php. This complete template hierarchy can be useful. If you want an archive page showing all posts of the post type courses … Read more

XML-RPC and Custom Post Types

@keatch is correct that out-of-the-box WP XML-RPC does not support post types other than ‘post’ and ‘page’. However, a quick stroll through the code indicates that this may be relatively easy to change. In WP 3.0.4, xmlrpc.php, line 1989, we have the function mw_newPost() (which does the heavy lifting). At line 2005 there is an … Read more

How to remove ‘create new post’ entry for a custom post type?

There are several ways (depending on what you’re trying to do): If it’s about the “publish” button You could… …remove the capability from the targeted role with remove_cap() …remove the publish button 1) 1) see bottom of the answer by @toscho …or the whole meta box 2) remove_meta_box( ‘submitdiv’, ‘custom_post_id’, ‘side’ ); 2) simplified version … Read more