WP is not using the select custom template.php that its selected for a page

I created a childtheme: Fisio

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

Read More
<?php
/*
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

-EDIT-

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

<?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' );

    }
}
?>

Related posts

Leave a Reply

1 comment

  1. 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.