Viewing 3 reply threads
  • Author
    Posts
    • #3726
      mcmaster
      Member

      From the answer at https://piklist.com/support/topic/editor-field-not-saving-data/ I got the impression that I could override the WordPress textarea meta box for post excerpts with a Piklist editor meta box.

      Here’s my metabox file:

      <?php
      /*
      Title: WYSIWYG
      Post Type: post
      Description: enables TinyMCE editor for excerpts
      Priority: high
      */
        
      piklist('field', array(
      	'type' => 'editor'
      	,'scope' => 'post'
      	,'field' => 'post_excerpt'
      	,'label' => 'Excerpt'
      	,'options' => array (
      		'media_buttons' => false
      		,'teeny' => true
      	)
      ));
      

      Unfortunately it doesn’t change the Excerpt box. I tried removing post type support for excerpts in hopes that would remove the WP box … which it does. But it also evidently prevents Piklist from creating its box.

      add_action( 'init', 'remove_post_excerpt' );
      function remove_post_excerpt () {
      	remove_post_type_support( 'post', 'excerpt' );
      }
      

      Suggestions? Thanks!

      p.s. tried this on 0.9.4.26 and on beta 0.9.5v

    • #3727
      mcmaster
      Member

      Firefox hung, so I restarted it. And now the excerpt is showing up as WYSIWYG. Go figure!

    • #3730
      Steve
      Keymaster

      @mcmaster– Glad it’s working for you. The WordPress function remove_post_type_support() should have nothing to do with Piklist meta boxes.

      This is a great example of replacing the excerpt box with a WYSIWYG editor.

    • #3733
      Steve
      Keymaster

      This was such a good idea we added it to our WordPress Helpers plugin! Thanks.

Viewing 3 reply threads
  • The topic ‘WYSIWYG post excerpts?’ is closed to new replies.