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.

1 Answer 1


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().

  • 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, 2012 at 19:49
  • 1
    First: See edit. Second: Simply add your complete html (including the <html> tags) in your editors HTML view.
    – kaiser
    Aug 26, 2012 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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