At this moment I use functions as described in the “Theme handbook” from the WordPress site. The problem is that the stylesheet is loading on the backend pages too and it affects the layout of the backend pages. This behavior is not wanted.

The code I use to load the stylesheet ->

Does anyone know a way/method to load the stylesheet only on the frontend so the wp-admin backend does not get affected?

Note: The CSS is compiled with scssphp when the $dev variable is set to true.

Read more here: Disable wp_enqueue_style for theme on wp-admin


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: