textarea_name is not working with wp_editor

$editor_id (string) (required) HTML id attribute value for the textarea and TinyMCE. (may only contain lower-case letters) http://codex.wordpress.org/Function_Reference/wp_editor The second parameter passed to wp_editor needs to match the id attribute of the textarea, not the name attribute. Your textarea doesn’t even have and id add one, then use that. <textarea id=”mypostcontent” name=”post_content” rows=”10″

Pull Youtube Link from 2nd WP_Editor

Maybe you should just add a custom field to accept the url itself, in stead of the wp_editor textarea; then append the video embed after you work with the input. Let me know if you need any help setting that up. OR: You could add a separete textarea to accept just comma separated or line-break … Read more

How to use wordpress text editor in php page

The wordpress editor is designed to work in wordpress enviroment and there is not much point in trying to somehow make it work “outside” of wordpress. You might hack it but any wordpress upgrade might break it. You need to use your php in the wordpress context by making a page template for your theme … Read more

wp_editor doesn’t save styling

You are stripping all HTML tags before saving principle_duties. sanitize_text_field() This function strips all HTML tags, so the value being stored has no HTML. That’s why it’s coming out as totally plain text. To sanitize wp_editor I would use wp_kses(). See here on how to use it: https://codex.wordpress.org/Function_Reference/wp_kses For the allowed HTML tags, you can … Read more

wp editor formatting

If you use Text editor, instead of Visual editor, you will add exactly the html code you wanted to add there. It has nothing to do with the PHP code you mentioned, just html from visual editor is transformed in the way you get it later (< and > and so on).

how to display wp_editor in a page

I think, there is a lack of wp_autop() and other formatting functions that get applied to the the_content filter. The editor does not save <p> tags at all, but later on line-breaks are converted into paragraphs by wp_autop(). I would like to say about meta content, for that like to recreate the default filters. I … Read more

wp-editor is empty on first submit

I just had the same problem. the submit of content of the wp_editor works not at first-submit, but perfect on second submit. Another way: Click on the html-button, and then click on the “Vusual”-Button. I do it with this jquery-statements in my jquery-code to submit the form: $(“#post_content-tmce”).click(); $(“#post_content-html”).click(); These 2 lines before the $.post-statement … Read more

wp_editor in text mode only(without TinyMCE)

Yes, it’s possible to set it to false. The full parameters list is in the file wp-includes/class-wp-editor.php. These are the default values for the $settings array when calling wp_editor( $content, $editor_id, $settings );: array( ‘wpautop’ => true, ‘media_buttons’ => true, ‘textarea_name’ => $editor_id, ‘textarea_rows’ => 20, ‘tabindex’ => ”, ‘tabfocus_elements’ => ‘:prev,:next’, ‘editor_css’ => ”, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)