Include single-<custom post type>.blade.php?

I’m trying to use a custom post type as the front page.

To do this, I’ve created the following front-page.blade.php, based on this SO answer:

global $wp_query;
$wp_query = new WP_Query([ 'p' => '13', 'post_type' => 'lp' ]);
$post = $wp_query->get_queried_object();

But, this doesn’t work. It still uses the default template.

Is there a way to fix this, or a better way to get this done?

1 Like

I think that

should be