Jump to content

Getting current template name - Adminbar bug?


thetuningspoon
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...