Viewing 7 reply threads
  • Author
    Posts
    • #2669
      ajayphp
      Member

      how to convert post field post_content as normal content area instead of editor
      how to convert editor content field into textarea not any options. want custom postType with title and content as textarea

    • #2676
      Steve
      Keymaster

      @ajayphpTry this tutorial. But instead of using the editor field, use textarea.

    • #2688
      ajayphp
      Member

      Hi,

      in post type support array when i used textarea instead of editor
      then only title were display while add new item , not any content area:

      $post_types[‘supercode’] = array(
      ‘labels’ => piklist(‘post_type_labels’, ‘Keywords’)
      ,’title’ => __(‘Enter Keyword Title’)
      ,’supports’ => array(
      ‘title’
      ,’textarea’
      )

    • #2711
      Steve
      Keymaster

      @ajayphp– Leave supports the way it was. When you create your FIELD, use the textarea field instead of editor.

    • #9119
      cosmocanuck
      Member

      Hi Steve! There’s info in your reply here that I think needs to be included on this page:

      https://piklist.github.io/docs/fields/types/editor/

      I wanted to replace the default editor field with my own (mainly just so I could reposition it amongst my other custom fields), but when I used the code in the above reference page, which it says will achieve this (the code block just under “Piklist can replace the default editor in WordPress by using code the following code.”), it still only added an additional editor field – the default one was still there.

      Only after I changed 'type' => 'editor', to 'type' => 'textarea', did the unwanted default editor field finally vanish. Is this just a code typo? Anyway, wanted to let you know!

      All the best,
      Adam

    • #9120
      cosmocanuck
      Member

      Sorry Steve, I erred – changing the type to “textarea” just made MY custom field not display at all. Sorry to inadvertently hijack this thread as my problem is probably unrelated!

      Alas I can’t reference your original link (https://piklist.com/user-guide/tutorials/replacing-wordpress-post-editor/) as it’s no longer at that URL… but as I say, when I use the provided code, it just adds a field but doesn’t remove the default one.

      This is a custom post type, does that affect things?

      Anyway, thanks for whatever help you can offer!

      Adam

    • #9121
      cosmocanuck
      Member

      It’s all sorted. Sorry to add further clutter to this discussion – I’d delete my posts but that’s seemingly not doable…

      Realized that specifying what fields are shown – or not – is part of defining the custom post type. Removed “editor” and it’s all sorted!

      Thanks for providing me a place to work out the answers to my own questions… 8^)

      Adam

    • #9133
      Steve
      Keymaster

      Glad it worked out. Closing this ticket.

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