WordPress Check If Is Dashboard

There is no specific function in WordPress to check if the current screen is the Dashboard screen. So best is to use

To check if it is currently the admin panel, the Dashboard as a whole, you can use the is_admin() function which returns a boolean true | false. Please note that wp_ajax_ requests will also return true on is_admin() though.

Source: Function Reference/get current screen « WordPress Codex

Shares

1 Comment

  1. Thank you!

Leave a Reply

Your email address will not be published.

*

© 2017 Contrid

Theme by Anders NorénUp ↑

Pin It on Pinterest

%d bloggers like this: