WordPress WordPress Theme Development Adding a Blog to a WordPress Theme Setting up the Blog Homepage

Tolga CANATAN
Tolga CANATAN
8,995 Points

Wordpress text editor doesn't work in my new wp theme

Hi everyone,

I'm developing a new wordpress theme while i'm watching wordpress theme development course. I'm in the center of the development process.

I see an error about WP text editor when I'm a new review post that i created new post type.

Following steps for problem:

  1. Go to the admin dashboard.
  2. Click to 'New Post' or 'New Page' or 'New Review'.
  3. See the text editor is dissapered.

This problem only shows if the post doesn't have the content. I actually mean, when i visit the edit page of full content of any post, i correctly see the editor. But when i visit new (blank) post page, this problem produced again and again. (I can also only see the 'Publish for review'. not 'Publish'.)

Where is my text editor?

I have created a index.php home.php single.php sidebar.php post.php single-review.php etc.

I found an solution:

// copy to functions.php
add_action( 'edit_form_after_title', 'rgc_posts_page_edit_form' );
function rgc_posts_page_edit_form() {
    global $post, $post_type, $post_ID;
    if ( $post_ID == get_option( 'page_for_posts' ) && empty( $post->post_content ) ) {
        add_post_type_support( $post_type, 'editor' );
    }
}

This solutions is work. But i can't see the 'Publish' button yet.

I also repreduced this problem with another theme (Twenty series etc.)

http://tinypic.com/view.php?pic=2hg45jt&s=8#.VaRM8DJqwlU

Thank you for your help. I'm so sorry for my bad English :(