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

  • Resolved xuyunzeng

    (@xuyunzeng)


    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 5 replies - 1 through 5 (of 5 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.

    Moderator Marius L. J.

    (@clorith)

    Hi,

    I’m not able to replicate this problem on my local installation, but we have had a few RC releases since this was first reported. Would you be able to test again if this is still the case, and if it is, create a ticket with the Gutenberg repository on GitHub, which is where development of the new block editor happens?

    Since WordPress 5.9 is near to be released, and the FSE editor is brand new with this release, and technically works in its current implementation with HTML template files, I’m marking this topic as resolved, so that we know what topics still need to be addressed before the release, but please feel free to keep us updated if you wish!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Editor not working when front page is a php file (5.9 RC1)’ is closed to new replies.