thetuningspoon Posted July 30, 2012 Posted July 30, 2012 Hey guys, I'm trying to grab the name of the current template in order to apply it as a body class which I can use to tweak my CSS based on the template I have loaded. I'm using $page->template->name to achieve this. It works, except when I have the adminbar installed. If the adminbar is running, the template name is output as "adminbar-loaded" instead. Any way around this?
Soma Posted July 30, 2012 Posted July 30, 2012 https://github.com/apeisa/AdminBar/blob/master/AdminBar.js#L4
apeisa Posted July 30, 2012 Posted July 30, 2012 Is that somehow blocking the usual class or do you get both? I don't think it should "block".
thetuningspoon Posted July 30, 2012 Author Posted July 30, 2012 Whoops, nevermind. It's including both classes now. This must have been an error on my part somehow. Thanks! 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now