I’m working on a project for a client who has some specific requests related to the WordPress admin dashboard. The client accesses the WordPress dashboard via a browser (not the app) and it’s RTL. Here’s a detailed list of the issues and attempted solutions so far:
1. Disable Responsive Design for the WordPress Admin Dashboard
The client wants to disable the responsive design for the dashboard only (not the site itself), so it appears the same on mobile as it does on desktop.
My Attempts:
Quick Solution: Used the “Request Desktop Site” feature available in browsers. However, this isn’t practical as editors have to enable it repeatedly.
Slow Solution: Downloaded the dashboard.css file, removed all the media queries, and loaded it with this code:
add_action('admin_enqueue_scripts', function () {
// Deregister original styles
wp_deregister_style('dashboard');
wp_deregister_style('dashboard-rtl');
// Enqueue custom styles
wp_enqueue_style('dashboard', get_stylesheet_directory_uri() . '/custom/custom-dashboard.css', [], null);
wp_enqueue_style('dashboard-min', get_stylesheet_directory_uri() . '/custom/custom-dashboard.min.css', [], null);
wp_enqueue_style('dashboard-rtl', get_stylesheet_directory_uri() . '/custom/custom-dashboard-rtl.css', [], null);
wp_enqueue_style('dashboard-rtl-min', get_stylesheet_directory_uri() . '/custom/custom-dashboard-rtl.min.css', [], null);
});
Unfortunately, this didn’t work as intended.
2. Redirect Dashboard to the “All Posts” Page
The client wants the dashboard to automatically redirect to the “All Posts” page (edit.php) after logging in or after pressing the Publish or Update button when editing a post.
Attempts so far:
I’ve tried various hooks like login_redirect and others, but I couldn’t get it to work for the Publish/Update action.
3. Text Cutting Issue
When I attempt to cut text (on mobile), it actually copies the text instead of cutting it. Additionally, it removes the last letter of the selected text during the process.
Troubleshooting steps taken:
Disabled all custom code in functions.php.
Deactivated all plugins.
Issue persists even in this clean state.
4. Unable to Type in the Title Field
When using “Request Desktop Site” in the mobile browser, I can paste text into the Title Field, but I cannot type directly in it.
I would appreciate any guidance or solutions for these issues.
Thank you so much