I have a custom post type, user submitted posts. When viewing a post as admin I only want to "Show" the posts title and content as there is no need for it to be in a text area or wiziwig.

It's not a case of not wanting admin to update the post It's more of a visual thing for the client.

I'm fairly new to Wordpress but I have a decent programming background and my PHP is ok. I'm not sure the words I've used explain what I need are correct but hopefully someone can point me in the right direction!

  • I failed understanding this, I'm afraid. Can you attach screenshot[s] and rewording the question to make a bit clear? Aug 16, 2015 at 11:43

1 Answer 1

add_action( 'edit_form_after_title', 'my_edit_form_after_title');
function my_edit_form_after_title($post) {
  $post_types = array( 'page' ); // post type / s
  $templates = array( 'template-custom.php' ); // not edit :D
  if( !in_array( $post->post_type,         $post_types) ) return;
  if( !in_array( get_page_template_slug(), $templates) ) return;

  global $_wp_post_type_features;

  foreach ($post_types  as $post_type) {
    if( isset($_wp_post_type_features[ $post_type ]['editor']) ) {
       unset($_wp_post_type_features[ $post_type ]['editor']); // we remove the "editor" if supported in this post type

  ?><p><?php echo $post->post_content; ?></p><?php // custom print post_content :D 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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