Re Order Editor to be after meta box [duplicate]

This will allow the post editor to be moved like the other sortable post boxes. function move_posteditor( $hook ) { if ( $hook == ‘post.php’ OR $hook == ‘post-new.php’ ) { wp_enqueue_script( ‘jquery’ ); add_action(‘admin_print_footer_scripts’, ‘move_posteditor_scripts’); } } add_action( ‘admin_enqueue_scripts’, ‘move_posteditor’, 10, 1 ); function move_posteditor_scripts() { ?> <script type=”text/javascript”> jQuery(‘#postdiv, #postdivrich’).prependTo(‘#your_meta_box_id .inside’ ); </script> … Read more

How to see files in directories in “Edit Themes” screen

There is not a way to do this without modifying the core. You should see .php files that are in subdirectories, but you won’t see anything above the root theme directory for .css files, and you won’t see any JavaScript files. If you take a look at wp-admin/theme-editor.php, the relevant lines are… <?php $allowed_files = … Read more

How to create WP Editor using javascript

Thanks to Jacob Peattie’s comment I can answer this using JS only. Actually we did something similar, but prior 4.8 and it wasn’t this easy, so we did use wp_editor() in the end. But now, you can do so using wp.editor object in JavaScript. There are 3 main functions wp.editor.initialize = function( id, settings ) … Read more

How to add a class to ul tags created by the WordPress editor Tinymce?

It’s always a good idea to look at WordPress Codex before asking. TinyMCE Custom Styles <?php // Insert ‘styleselect’ into the $buttons array function my_mce_buttons_2( $buttons ) { array_unshift( $buttons, ‘styleselect’ ); return $buttons; } // Use ‘mce_buttons’ for button row #1, mce_buttons_3′ for button row #3 add_filter(‘mce_buttons_2’, ‘my_mce_buttons_2’); function my_mce_before_init_insert_formats( $init_array ) { $style_formats … Read more

WordPress admin screen very slow / timing out when editing or adding a new page/custom post

This may not help any, but it can’t hurt to try it… Log into your server admin area, invoke the client interface for your database administration (e.g. phpMyAdmin), delete all the posts where their ‘type’ is marked as a revision, then compact the table. If you have thousands of pages, you might also have millions … Read more

Markup of oEmbed codes in the editor?

I think this might be a step in the right direction: http://codex.wordpress.org/Plugin_API/Filter_Reference Specifically the the_editor_content filter which is “applied to post content before putting it into a rich editor window.” Sorry I can’t flesh it out more for you but I am just starting to play around with filters myself and have miles to go … Read more

How to enable edit button in the theme’s customize UI?

I just had the same issue and with a little googling I found the following solution: // Add the selective part $wp_customize->selective_refresh->add_partial( ‘your_theme_second_logo’, array( ‘selector’ => ‘#yourID’, // You can also select a css class ) ); After you add the custom settings, you need to tell to WordPress what settings you want to manage … Read more

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