Cannot access WordPress Appearance → Editor

Why it happened: Since WordPress back end editor runs on top of WordPress itself, if you cause a critical Error within the PHP files, that will cause error on the backend Admin Panel as well. At that point you will no longer be able to access the backend editor until you fix the error. What … Read more

wordpress editor role remove all but ‘menus’ in appearance menu

by default the editor role should not have access to plugins nor appearance menu. But maybe this roles is already customised in your installation? here is a list of editor default capabilities via functions.php you can remove everything in the appearance menu like so: $role_object = get_role( ‘editor’ ); $role_object->remove_cap( ‘edit_theme_options’ ); to remove access … Read more

Adding custom styles to dropdown in editor

You can add this code to your functions.php function add_style_select_buttons( $buttons ) { array_unshift( $buttons, ‘styleselect’ ); return $buttons; } // Register our callback to the appropriate filter add_filter( ‘mce_buttons_2’, ‘add_style_select_buttons’ ); //add custom styles to the WordPress editor function my_custom_styles( $init_array ) { $style_formats = array( // These are the custom styles array( ‘title’ … Read more

Missing .twig files in wordpress theme editor

The thing you need to do is update the filter with the “allowed” editor file types. Here’s what you’ll need for TWIG: function add_custom_editor_file_types( $types ) { $types[] = ‘twig’; return $types; } add_filter( ‘wp_theme_editor_filetypes’, ‘add_custom_editor_file_types’ ); Of course, you can add any file type/extension you wish in the same manner. The editor UI will … Read more

How to add notice text above Post Editor?

Assuming you’re using gutenberg you need to use javascript to do this. Here’s the steps I would take. In your child theme you’ll need to add some code. Add a new directory “js”. In that directory add a new file called “alerts.js” In that file add this code: (this is the actual warning note) ( … Read more

Can Rich Text features be configured per user?

look here tinymce and users and add something similar to your themes functions.php and maybe work on that by wrapping it with a custom role / capability which you assign to your trusted users: if (current_user_can( ‘have_tiny_mce_options’ ) { tinymce options here } the page example only shows 3 options but im sure that this … Read more

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