You are obviously using full site editing theme if you have HTML templates. For classic themes you have PHP templates and there you can enter php code.
Full site editing html templates use only blocks in their templates and you can’t use PHP there. You can only use existing or build new block and place block template code there.
So either switch to classic theme, or use existing blocks in your theme to build a template or learn to develop blocks if existing block don’t fit your needs, which is more demanding than PHP development in classic theme templates.
Related Posts:
- How to render a block from php template
- To close or not to close php
- How does printf( __( ) ); work?
- Return HTML Template Page with PHP Function
- Why do templates contain so many PHP tag pairs?
- How to serialize a Gutenberg block from block attributes in PHP?
- Removing Default Gutenberg Blocks, But Keeping Reusable Block Functionality?
- Is there a way to parse shortcodes in PHP?
- is_admin returning false in backend in server side rendered block
- Displaying a WooCommerce product via PHP
- Change title only in dynamic page
- Secondary navigation menu on one page
- Enable custom logo upload if logo is not in header
- How can I edit the content in index.php? [duplicate]
- Add class to group inner container
- Woocommerce Show Single Product on Homepage
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- how to show only specific category for a template
- Show a different code on front page to other pages
- Does wordpress templates always in files or in database?
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]
- Using same variable names in files added with get_template_part()
- PHP include is only working in certain places in my custom WP theme
- Use WordPress function in php file
- Adding wrapper elements in the_date() like in the_title()?
- How to get all author posts outside of author templates
- Add filter multiple times using only one master function
- Create a Blog Template Page
- Showing latest post without 301 redirect
- WordPress template page name displayed on screen
- Is there a way to hook or call a custom woocomerce template that is not part of the default templates of woocommerce?
- single.php with different look by category
- How to call multiple functions from multiple files into a WordPress page template [closed]
- How do I define a lookup table that will work across all PHP elements of the template?
- persist a variable set in header.php all the way down to footer.php
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- Removing WordPress Footer -without access to PHP code?
- How to set a template with wp_insert_post
- Why is a wp function used in current PHP namespace’s callback not resolved to global scope?
- Multiple requests external data api dynamic block gutenberg
- Why does the Woocommerce grouped template prints the unpublished products?
- Adding conditional text to a PHP Shortcode Template
- How to keep the capability of users and disable Gutenberg editor in WordPress?
- Create page template via functions.php?
- parsing nested blocks (in columns, etc) via PHP
- Passing the name of selected color from the custom component to `render_callback`
- InnerBlocks with allowedBlocks not working with acf_register_block
- What’s a good way to allow overwriting files within a child theme if I want the same folder structure?
- how to display this functions?
- is_page_template showing partial results
- Adding regular php file to site
- Advice on creating a WP Archive Template with Custom Taxonomy (get_term_meta)
- add_filter function concatenate string and locate_template function
- Guttenburg and Classic Editor – How to use the custom guttenburg block in classic editor?
- Template Loop – add switch case php
- Override Admin menu icon
- Post repeated when opening in overlay, how do I solve this? [closed]
- How to suppress template-parts in undescores?
- Need help with pagination
- How can I get “Previous” and “Next” to show in the navigation besides the links?
- Creating custom page template from existing PHP site
- How do I query a single data value from the wp_metadata table?
- Conditional string comparison failing for basename/slug
- Splitting the_content() by size?
- Gravity Forms merge tags in templates?
- Unable to render custom field after attempt to generate a list of recent post in page template
- How to add new CSS file to new PHP file
- php loading different structure than source code
- pass html code to worpdress
- Some problems calling a function into sprintf() inside functions.php template file [closed]
- Getting a WordPress tag to print inside of a traditional php echo
- Want to unrestrict plugin block
- WordPress – Get Posts with Category data
- Additional file upload in Gutenberg page options/featured image
- Add Block Before Entry Title Using PHP
- Loading Elementor templates in a Bootstrap modal on button clicking
- How to populate a Gutenberg select field SelectControl with option value from PHP array
- Gutenberg Blocks and get_option() for styling
- How to extend SelectControl with data from my theme
- Prevent header and footer from loading on specific pages with template or plugin
- Integrate admin plugin into template. Very interesant (live search + autocomplete with wp rest api, in vanilla js)
- Copying and pasting to WordPress “code editor” code via the front end and clipboard
- Require()/Include() post template adding extra content
- Display articles with a different template in the home page | Solved |
- Display metabox galleries on specific page template in admin editor
- Display WordPress archive template page in 3 columns and not 1 column [closed]
- Run do_shortcode on php template using JS function
- Gutenberg block don’t save rich text content
- How to hardcode header and footer in WP?
- What are the advantages/disadvantages of ways to use php template files?
- Change the “Show All” button in a WordPress Portfolio Filter
- Check if current post in loop is last on current page
- Is there a PHP function that will return the block ID generated by WordPress?
- register_block_type is not working properly
- Categories does not show Block editor WordPress
- Converting Array to String Issue [closed]
- ACF – Custom image for Product Tags not displaying
- Block that renders html saved in a php file
- Polylang and template files
- Roots Sage Symfony error when using override from template