But how does the actual HTML get on the page? How does that SQL data translate into a page full of blocks?
Normally the HTML for a block is inside the HTML comments.
However, much like shortcodes, ACF blocks are rendered in PHP, so when the post is processed during the_content
filter, that block is replaced with the rendered HTML. WordPress knows to do this because ACF registered the block and provided a render callback function to call.
So this is essentially a more modern version of a shortcode with a better UI and developer features ( and the bonus that you don’t get a raw shortcode displayed on the frontend if ACF is deactivated )
As for how ACF then retrieved the data from the database, you would need to ask in an ACF forum, as that is unique to ACF blocks.
HTML not wrapped in the comments is interpreted as classic content from the classic editor when edited.
Related Posts:
- Is there a way to list all used/unused WP templates?
- Gutenberg & Pre-formatted Templates: Core Block Attributes
- Gutenberg Editor – Template Doesn’t Match Error
- How to replace WordPress sidebars (widget areas) with Gutenberg
- Display HTML only if Custom Field has a Value
- How do you override Post template when using Query Loop block?
- ACF image field to WordPress featured image
- Advanced Custom Fields – display when specific template used?
- How to Increment ID value within ACF Repeater Field Loop
- How to custom page template for the Gutenberg editor
- Use PHP templates as blocks
- Can I add a default Block to my custom theme?
- Is there a way to create a block template that is not limited to a post type?
- ACF costum date format [closed]
- Dynamically Insert Image Into Stylesheet
- Can you use block patterns in block templates or insert them programmatically?
- Change default template in the block editor (Gutenberg)
- Query the database after get_header() has been included
- How to set up page fields with gutenberg instead of ACF
- How to limit block activity (insertion/deletion) to inside of a Block Template on the Admin Screen?
- templates page not showing on gutenberg editor
- Category theme template becomes default template for child theme
- Add default meta data to a page/post template
- Adding new Template Parts in the Block Editor when using Classic Themes
- Get_Template_Part and Template files in TwentyTwentyFour Block Editor
- Difference Between Block Templates and Site Editor Templates
- How to use Class
in Java? - Get name of the current template file
- How do you find out which template page is serving the current page?
- How to change the default registration email ? (plugin and/or non-plugin)
- How do I get the size of an attachment file?
- Is there any way to use get_template_part() with folders?
- Adding Page Attributes Metabox and Page Templates to the Posts Edit Page?
- How can i change email template for new user
- Any advantage to using get_header() over include(‘header.php’)?
- Enable page templates. How?
- Is it possible to override the result of get_template_part()?
- Use [embed] filter in template files
- What’s the purpose of the paged.php file?
- How do you access the Product Short Description in a WooCommerce email template? [closed]
- Prevent comments_template() to load comments.php
- Page editor missing Templates drop down
- Print WordPress template filename(s) for debugging
- How to prevent execution of default query, while preserving ability to use WP_Query in template?
- How to force TinyMCE in WordPress to replace newlines with tags and not with
- How to find the posts page (home page) programatically
- WooCommerce: Change template for single product page
- View WordPress page template usage (or unused)
- How to edit contents of dynamic_sidebar()?
- How to check if a shortcode exists?
- Where is get_header(‘shop’) file in Woocommerce templates
- Custom templates folder
- What is the link to my default “archive” page?
- How to get “Additional CSS Class” for ACF Gutenberg block
- How to get slug of current category in taxonomy template?
- How to show a under construction page for a domain but still be able to work on index.php?
- Change the name of the ‘Default Template’
- Customizing get_the_excerpt() to specific length and “Read More” output.
- How to Rename a Template File?
- get page templates
- Echoing Elementor page content in template, but it doesn’t get styles and some widgets are missing
- Using WordPress templating for HTML emails
- Is it possible to access Gutenbergs reusable blocks in CPT block templates?
- Loading partial templates with AJAX/PJAX
- WP frontend output of custom textarea fields not respecting line breaks. In admin it’s OK
- How do you check if a WordPress template file exist?
- Load entire NextGEN gallery from single thumbnail?
- I put my blog on a subpage, how do I get page title?
- A special single page templates for posts under a category and all its child category
- Custom reset password template after forgot password request
- Outputting Canonical Resource URLs Across a Multisite Network?
- Gravity Forms Custom Templates [closed]
- Child Theme: how to override variables?
- How do I get the URL of a specific size featured image?
- Where to store some per-template preferences?
- add/apend templates ‘transparently’ via plugin to currently active theme or child theme?
- stop blog page from using index.php?
- How can I modify the default reset (lost) password email text?
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How to create tag.php
- Template files missing after moving site
- How do I override template-tags.php in twentyseventeen theme
- Get template part vs locate template function
- Programmatically change post templates?
- How to hide/redirect the author page
- Tools for Converting an Existing Website Design to a WordPress Template?
- Restrict a search to a custom post type
- author.php added to template not working on Nginx server
- Test if page is child and has children, if so echo child pages also on grandchild pages
- Need to give custom page template for each language in WPML
- roots child theme can’t override header.php
- How did you incorporate WooCommerce in your own WordPress theme?
- Correct process for a new Page Template?
- Templates & CSS – Proper Programming Practice?
- How to assign a class to a page with a custom template?
- wordpress – load a template based on the URI
- When calling wp_title(), do you have to create some kind of “title.php” file?
- Create Pages from Database
- A shared custom taxonomy between two custom post types
- Creating a custom category page with pagination