WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a custom post type; the content of this custom post type should be a full html page - not just a snippet of html.

The standard editor appears to interfere with the html and it does not appear to be ready to handle a full html page source as its content.

Ideally, I would love to be able to disable the 'editor' capability for this custom post type and replace the editor with a custom plugin - only, I'm not sure about the best course of action to implement this functionality. I am open to writing the plugin myself, but it would be nice to learn that such a plugin exists already.

share|improve this question
up vote 2 down vote accepted

The Problem

It seems that you're using the normal theme template files for posts and pages to display your custom post type. This means, that you also got the wp_head() hook and other template, that output default (post/page specific) things.

The solution

Add a template file to your theme, that's named single-{$post_type}.php and nothing than the loop with only echo get_the_content() in it. This way you can build your HTML without any interference.

get_the_content() has no filters applied, that normally get attached to the_content().

share|improve this answer
kaiser, I have done that and it works quite well - however, this "single-{$post_type}.php" page outputs the_content() unaltered, so I would need the_content() to be a full html page, including <html>..</html> - how can I edit such a full html page in the custom post edit admin page? Basically, I need to serve the_content() as-is, and be able to store full html pages (that I do not know the content of beforehand) into the custom post type content field. – magma Aug 26 '12 at 19:49
First: See edit. Second: Simply add your complete html (including the <html> tags) in your editors HTML view. – kaiser Aug 26 '12 at 19:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.