• Hi,

    I’m creating a custom theme and found a great article on creating custom meta boxes for the post/page editor in the admin. Here’s the article.

    The only thing is that I want to be able to have a different set of meta boxes for different templates. On the front end there are all these great conditional tags like is_page_template.

    if ( is_page_template('page_home.php') ) { echo 'it works'; }

    In the admin panel, these aren’t working. I could use the following code below to test for the page ID, but i really want to test for the template in use. Anyone?

    if ($pagenow=='post.php' && $_GET['post']=='122') { echo 'it works'; }

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Get current page template while in admin post editor?’ is closed to new replies.