csswordpressadminpreviewarea

Wordpress styling for admin panel


I have a wordpress site that I am working on. The frontend of a section is working fine. But that section is breaking in the admin panel preview area.

What I have searched till now has led me to the whole page of dashboard styling solutions. What I require is to target the content in the preview area.

I also have solution but that is not working on server side. It is working fine on local server.

function load_admin_style() {
  wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/assets/css/admin-style.css', false, '1.0.0' );
}
add_action( 'admin_enqueue_scripts', 'load_admin_style' );

Have not been able to find solution for this yet. A little help would be appreciated.

Thanks in advance.


Solution

  • My requirement was to show the admin panel same as the website.

    There is nothing we can do about it. Although, I used ACF blocks to create the pages looks like the web pages in admin panel.

    That helped the users to understand which page and what section they are working on.

    Apart from this, if you want to customise whole admin panel, I do not think there is anything like that.