WordPress code editor messed up my code!

This isn’t as good as line numbers but you can add a dummy class every so often. #_________section_1 { display: none; /* Just in-case it strips the empties */ }; It may help you to quickly scroll to the relevant section. To be honest though, you should have a mirror of your site stored locally … Read more

What is this format called (nested shortcodes)?

I would use the phrase Nested Shortcodes to describe it. You can find many questions using that phrase here on WPSE. The Codex also uses it, for example here: http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes Since the shortcodes in your example are related to the layout, we could perhaps call it: Nested Layout Shortcodes to be more specific. If you … 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).

Creating multiple wp_editer() text fields in for loop — the text/visual switch only works for first editor

https://codex.wordpress.org/Function_Reference/wp_editor The second argument for the wp_editor() function is editor ID In the above for loop – all of the editors had the same ID Changing <?php wp_editor( wp_kses_post( $benz_tab_content ), ‘benz_tab_content’, $settings ); ?> to <?php wp_editor( wp_kses_post( $benz_tab_content ), “benz_tab_content_$y”, $settings ); ?> allowed me to give each editor a unique ID — … Read more

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 add media button not working

I will assume that you are creating a custom admin page at ?page=add-quiz, in this case before calling the wp_editor function you also have to enqueue the CSS / Js files for it with the wp_enqueue_media() function. So at the end you should have wp_enqueue_media(); wp_editor( ”, ‘instructions’, $settings = array(‘textarea_name’ => ‘instructions’, ‘textarea_rows’ => … Read more

disable tags on wordpress text editor

WordPress already disallows the use of JavaScript in the editor for users without the unfiltered_html capability. By default, only the Administrator and Editor roles have this capability. If necessary, you could remove this capability from Editor users as well. (It doesn’t make sense to remove it from Administrators, because they will still have the ability … Read more

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