Support » Alpha/Beta/RC » Editor not working when front page is a php file (5.9 RC1)

  • I am building a new FSE theme from scratch and I hit a limitation of the 5.9 Editor, so I decided to use a home.php file in order to be able to customize my front page.

    However, this is where I hit a bug.

    If my frontpage is a home.php, my 5.9 Editor shows a blank screen when I click on it.

    Not sure what else to say, but feel free to ask for more clarification.

    PS: the limitation I hit was that I couldn’t overlay a logo over the core/video component, nor am I able to fetch Google reviews with FSE’s blocks without custom coding.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator t-p

    (@t-p)

    If you take a look at the “templates” files in twentytwenty-two theme, they all are .html

    Also, in the site editor, when adding a new template, the user has the option to select between search and front page: admin -> appearnace -> editor -> templates -> Add New (Upper Right Corner)

    Thread Starter xuyunzeng

    (@xuyunzeng)

    Thanks t-p for your reply.

    My intention of pointing this bug/feature out is to highlight how some people will use .php templates to overcome the limitations of the new FSE method of using HTML files.

    So, if I use a home.php file, the new editor should be able to handle it gracefully, perhaps by saying “the home page is a PHP file and cannot be edited in Editor”. Or something like that, meanwhile, it should allow access to the other HTML files and template parts. Showing a blank white screen was unexpected behaviour.

    Moderator t-p

    (@t-p)

    I came across this tutorial How to use PHP templates in block themes .

    Honestly, I don’t quite follow it! May be you can get some idea from it.

    Thread Starter xuyunzeng

    (@xuyunzeng)

    That’s a really good website that I read thoroughly before I experimented. Thanks t-p.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.