So I created a action add_action( 'header', 'admin_bar', 8 );
, so that it loads in the header. However, I don’t want it to load on certain pages, for example, post-new.php
. Can I have a condition for hooks to load only certain pages?
Leave a Reply
You must be logged in to post a comment.
I believe there is a $pagenow global. not sure if it’s still there but you could var_dump($pagenow) on the pages you want to exclude to find the value then do something like this in your function…