Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #1706
      kattagami
      Member

      Hello,

      I use the editor field in a CPT. When I fill in this field and Publish or Update my post, nothing seems to be saved in the DB.

      This is my code for the editor field:

      
      piklist( 'field', array(
      		'type'          => 'editor',
      		'scope'         => 'post',
      		'field'         => 'biography',
      		'label'         => 'Biography',
      		'value'         => 'Write the speaker\'s biography here ....',
      		'options'       => array (
      					'wpautop'        => true
      					,'media_buttons' => false
      					,'tabindex'      => ''
      					,'editor_css'    => ''
      					,'editor_class'  => ''
      					,'teeny'         => false
      					,'dfw'           => false
      					,'tinymce'       => false
      					,'quicktags'     => false
      		),
        )
      );
      

      The other fields are saved.

      Someone else has the same problem?

    • #1707
      Jason
      Keymaster

      Maybe I’m wrong, but if the scope is post I believe the field has to be a column available to the wp_posts table (e.g. content, excerpt, etc.). Otherwise, if you omit the scope parameter (or use ‘post_meta’), it should save just fine to the wp_postmeta table.

    • #1708
      Steve
      Keymaster

      @kattagami


      @jason
      is correct. Remove the scope parameter and it should work fine. For most situations you should not have to define scope and let Piklist automatically set it.

    • #1709
      kattagami
      Member

      Effectively, with scope=’post_meta’, works like a charm now 🙂
      Thx both of you.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.