vendredi 27 juillet 2018

Wordpress / CSS File only for one Menu-Page in the Backend

I have a own Plugin and I want to add a css file to style the menu-page for this plugin in the backend. Right now the css file works for all pages in the backend but it should only works for my plugin.

function ww_contact_backend_style() {
wp_enqueue_style('admin-styles', '/wp-content/plugins/ww- contact/css/backend.css');
}
add_action('admin_enqueue_scripts', 'ww_contact_backend_style');

I tried this, but it didn´t work:

if(menu_page_url('ww_options')){}

Aucun commentaire:

Enregistrer un commentaire