I created a childtheme: Fisio

Inside I have: page-team.php with the name:

Template Name: Page - Team
<?php get_header(); ?>
<script>alert('its the team page')</script> 

And in the wp-admin I selected it for the page: Team

Please check the page name and the selected template

The problem is that any changes I make to page-team.php are not affected. In fact, the alert is never executed.

What am I missing?

PD: Is there a way to know wich was the template used having a look to the source code? I can't find this


forgot to mention that team is listing a custom post_type: team, here is the declaration in functions.php

 * Custom Post type register framework
include(get_stylesheet_directory(). '/inc/acpt/init.php');
add_action('init', 'makethem');
function makethem() {
    $args = array(
        'supports' => array( 'title', 'editor', 'page-attributes', 'thumbnail', 'excerpt'  ),
        'hierarchical' => true,

    $team = new post_type('team','team', false,  $args );


 * Initialize the metabox class
add_action( 'init', 'be_initialize_team_meta_boxes', 9999 );
function be_initialize_team_meta_boxes() {
    if ( !class_exists( 'team_Meta_Box' ) ) {
        require_once( get_stylesheet_directory(). '/inc/metaboxes/fisio-metaboxes.php' );
        require_once( get_stylesheet_directory(). '/inc/metaboxes/init.php' );

  • have you save changes after you selected new template for a page? – Eugene Manuilov Mar 6 '13 at 12:08
  • Yes I Did. It did not return any error or warning and the template its still selected in the page settings. Any thoughts? – Toni Michel Caubet Mar 6 '13 at 12:11
  • I checked your code and its working fine. can you just show me which classes are gets added to body tag in front end? – Vinod Dalvi Mar 6 '13 at 12:14
  • Hello @VinodDalvi Thanks for your comment but I'm not sure i'm following you. If you mean the class attr to the body is: "archive post-type-archive post-type-archive-team logged-in admin-bar customize-support" – Toni Michel Caubet Mar 6 '13 at 12:19
  • Yes I have, I will add the declaration to the question. Thats right its in maintenance mode i don't think i'm allowed to share it.. – Toni Michel Caubet Mar 6 '13 at 12:29

You have created custom post type named team so it is displaying archive of custom post type team on the team page try changing slug of team page from team to team2 or something else but not team.

Visit this page to learn more about how wordpress handles templates.

  • You are a genius. Saved my hair from falling out. – JannieT Mar 26 '15 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.