Home / Archive / Disable Dynamic Template on the Homepage/Front-page
Duplicate Snippet

Embed Snippet on Your Site

Disable Dynamic Template on the Homepage/Front-page

The following snippet can be used to remove the dynamic template assigned to all pages from the homepage.

Code Preview
php
<?php
add_filter( 'totaltheme/theme_builder/location_template_id', function( $template_id, $location ) {
	if ( $template_id && 'single' === $location && is_front_page() ) {
		$template_id = 0; // disable on the homepage
	}
	return $template_id;
}, 10, 2 );

Comments

Add a Comment