Enable Custom Page Template for Static Front Page in WordPress

Page template settings in WordPress backend

WordPress will ignore your page template settings for the static front page with themes that include their own front-page.php. Here is a quick filter that checks for a page template setting and loads that one instead:

add_filter( 'frontpage_template', 'enable_custom_template_front_page' );

function enable_custom_template_front_page( $template ) {

	// Check if a custom template has been selected
	if ( get_page_template_slug() )
		return get_page_template();

	return $template;


Leave a Reply