After some more checking, I found the issue. The repo I was setting up, was a template that will be used by other sites, so I saved it in a folder called templates (Full path: /Users/bas/git/work/templates/wp). In the wp-includes/block-template-utils.php the name/slug of the template is decided with the following code.
$template_slug = substr(
$template_file,
// Starting position of slug.
strpos($template_file, $template_base_path . DIRECTORY_SEPARATOR) + 1 + strlen($template_base_path),
// Subtract ending '.html'.
-5
);
$template_base_path is templates in the Twenty-TwentyThree theme, so it split it on the first occurrence of templates which was a lot earlier in the string (see the full path). If I moved my repo to /Users/bas/git/work/template/wp it all works since the string is splitted correctly.
Related Posts:
- Correct way to make a custom block theme responsive
- Full Site Editing, Block Theme, Gutenberg, Site Editor
- Add colors to existing color palette without replacing it
- Gutenberg – editor-font-sizes in functions not working
- create-guten-block in wordpress theme?
- How to update mark-up of a gallery block in a custom theme?
- Block to show posts from same category
- How to add multiple custom blocks in custom WordPress theme using create-block?
- FSE Change Post Template to Something Other Than a List
- Do I actually need to link my theme’s style.css in the theme files
- CSS classes for theme
- My child theme doesn’t work Error: “The parent theme is missing. Please install your parent theme”
- Edit srcset and sizes attributes in Gutenberg image, cover and gallery – blocks
- Theme file for all pages that are a child of a specific page
- How to show next Post Thumbnail image in WordPress using current post id
- First post of each category
- create blocks programmtically on theme activation
- Create a theme by combining a parent and a child theme
- How to add oEmbed support to my theme?
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- If I build a custom theme, will it update?
- Recommended tools for Theme Development with SASS [closed]
- What tags should be used for themes to show the type of layout?
- What are non-printable characters doing in my theme?
- Custom button block doesn’t work
- How can I let templates choose which stylesheets are enqueued?
- Lightweight framework [closed]
- How to edit my theme for full width?
- What VSCode extensions are there for working with block themes? [closed]
- What is the “correct” way to add hooks or similar PHP behavior to a blocktheme?
- How do you replace content generated by custom fields with custom blocks in Block Editor?
- Echo all category names, apart from one
- How to place HTML tags in content from the_content()?
- correct tags for validating input types
- WordPress Theme Creation [closed]
- Renaming a theme so it aids SEO and the theme used is hidden
- Integrate WooCommerce theme with a WordPress theme [closed]
- Automated Footer information
- How do you use WordPress for a website that’s not in a blog format?
- WordPress 3.8 Backend Admin Color Scheme add more scheme how to do?
- Theme thumbnail in dashboard
- How to change the theme directory uri for localhost?
- Will my site get messed up when the wordpress theme updates if I edited the html code in the editor to change footer?
- How to correctly enqueue the parent and child theme stylesheets in the creation of a child theme? [duplicate]
- featured content: which area does this cover [closed]
- HTML block gutenberg templates
- Which cache is kicking
- searchform.php doesn’t work properly
- Customizer: get_preview_url() inside customize_save_after hook
- How to track a users last visited page?
- Shortcodes do not work in own template
- Adding Bootstrap to WordPress TwentySixteen Theme
- Is there a way to switch to another theme?
- New to WordPress – Read the Codex, Other Docs; Still Confused
- How to add custom page elements to the WYSIWYG editor?
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- When trying to set title, not sure how to edit it for different pages
- Post archives link yields a 404 Not Found
- Get video from the post on homepage
- static front page ONLY for certain themes?
- How to add cropped custom header image?
- Open portfolio image in light box
- Let visitors show/hide a type of content
- WordPress Themes Directory: Template which hits the standards?
- how to add a badge on product based on filter?
- How to change a local wordpress installation xml export file urls? and change them to what if you don’t have a live website?
- Any way to change/add to the theme name dynamically?
- Let user to upload multiple time
- how to create/register menu items that can be added to menus later
- How to diagnose wp-env environment problem
- WordPress and Semantic UI
- Theme does not allow shortcodes
- What is an alternative to not using child theme to customize a WordPress theme?
- Block validation failed for `core/pullquote` after adding theme support for editor-color-palette
- How to make menus, footer, sidebars multi language
- Different WP Rest API custom endpoints across different themes
- register_theme_directory() sees custom themes directory, but blank frontend
- Providing updates to your WordPress theme
- One-Page WordPress Template
- How to create multiple pages in a client theme?
- Using Customizer value in an external PHP file inside a theme
- Fail to install theme on development copy of WordPress on Webmatrix
- Import from HubSpot COS into WordPress 4?
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- Theme automatically inserting “more” tag on every post
- How get the 10 most viewed pages (not post)
- Using wp_enqueue_script with social media buttons?
- Getting all months in one year WordPress Archive
- Purchased Theme to Custom Made Theme? [closed]
- How to make website with many template that active [closed]
- Image Size wrong during upload
- How to create full header but keep content narrow
- Should you directly edit Template Parts and Templates from themes?
- Is there a block to print post link standalone in a block theme?
- Insert gutenberg blocks into template
- Image and font support missing in editor when deploying theme remotely
- Adding copyright notice to page bottom in full site editing template
- WP Update Messages get cut off during Theme update
- How to create a template for a post in Query Loop block?
- Get the name of the template/*html file used