How to get the Slug from the current page / for script queuing

Asked

Viewed 15 times

-1

I am developing a plugin, and I would like to check which page of the plugin is being visited, because I have the goal to queue the scripts according to the page, because I currently realized that all the scripts that I did at the beginning of my plugin, are being called in other pages(submenus) of my plugin, and also in third party plugins..

I think through Slug, I can then create a condition and line up the scripts according to this.

If there’s a better way, I’m curious.

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.