page_template_hierarchy

page_template_hierarchy

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('page_template_hierarchy') is found 1 times:

  • /wp-includes/block-template-utils.php line 1528
    1524
    1525
    1526
    1527
    1528
    1529
    1530
    1531
    1532
    1533
        return apply_filters( 'index_template_hierarchy', array( 'index' ) );
    }
    if ( $is_custom ) {
        /** This filter is documented in wp-includes/template.php */
        return apply_filters( 'page_template_hierarchy', array( 'page', 'singular', 'index' ) );
    }
    if ( 'front-page' === $slug ) {
        /** This filter is documented in wp-includes/template.php */
        return apply_filters( 'frontpage_template_hierarchy', array( 'front-page', 'home', 'index' ) );
    }

See this hook used in plugins: