wp-router icon indicating copy to clipboard operation
wp-router copied to clipboard

Unable to set template for root

Open drewbaker opened this issue 1 year ago • 1 comments

When visiting the home page, / this template doesn't work:

$router = new MakeitWorkPress\WP_Router\Router( 
    [
        'home'      => ['route' => ''],
        //'home'    => ['route' => '/'], // Both don't work
    ]
);

So how should we use the router to set a template for the home page?

Is this because a a theme requires index.php to work, which is the home page template? If so, would be good to add that gotcha to the readme.

drewbaker avatar Jul 31 '24 23:07 drewbaker