Hey everyone, I’m stuck trying to figure out the block markup and Full Site Editing (FSE) stuff in WordPress. I’ve been looking at the twentytwentyfour theme’s archive.html template, and there’s this weird code:
wp:query-title {"type":"archive","align":"wide","style":{"typography":{"lineHeight":"1"},"spacing":{"padding":{"top":"var:preset|spacing|50"}}}}
I can’t find any good docs on what options are available for wp:query- blocks. You know, like how there’s a page for WP_Query in PHP? I need something like that but for blocks and FSE markup.
I also want to show a taxonomy description in archives. Can I do that with blocks? Or do I have to make a PHP pattern with term_description() and then use wp:template-part to call it? Is there maybe a wp:query-term-description block I don’t know about?
I’ve been searching all over but can’t find anything helpful. Any ideas where I should look? Thanks!
I understand your struggle with finding detailed documentation for WordPress block markup and FSE. In my experience, no single guide covers everything due to the rapid evolution of these features. The WordPress Block Editor Handbook is a good starting point, and exploring the Gutenberg GitHub repository can often reveal undocumented options through code and issue discussions. Experimenting within the editor itself has also helped me uncover hidden functionalities. For displaying taxonomy descriptions in archive templates, creating a custom dynamic block to fetch term descriptions might be the most effective approach. Staying engaged with the WordPress developer community is essential as new insights emerge frequently.
hey there, i feel ya on the documentation struggle. have you tried digging through the gutenberg github repo? sometimes you can find hidden gems in the code comments or issues. for taxonomy descriptions, i’d probably go with a custom block. it’s a bit of work, but gives you more control. keep experimenting and good luck!
Having worked extensively with WordPress blocks and FSE, I can attest to the scarcity of comprehensive documentation. The official Block Editor Handbook is a good starting point, but it often lags behind the latest developments. For more up-to-date information, I’ve found success in examining the source code of core blocks and studying their implementation.
Regarding taxonomy descriptions in archives, I’ve implemented this using a custom block that leverages the WordPress REST API to fetch term data. This approach offers flexibility and keeps your template files clean. While there isn’t a built-in block for term descriptions yet, creating one isn’t overly complex if you’re comfortable with JavaScript and the block API.
Remember, the WordPress block ecosystem is still evolving rapidly. Staying active in developer forums and following key contributors on social media can help you stay informed about new features and best practices.