How to integrate more complex code in a block theme?
-
I still have not fully understood what the best way is when developing a custom block theme and integrating features which are too complex for the standard blocks, for example an events page which is split into current events plus an events archive on the same page.
If I want to write a custom code where those events (custom post types) are automatically ordered by date on a page in the correct section, namely ‘current’ or ‘archive’ I struggle to implement this in a block theme while I totally know how to write it in PHP.
Or a filter, or custom post types which are ordered on a page according to their taxonomies etc….
Do I follow in such a case this suggestion of creating a PHP template: https://fullsiteediting.com/lessons/how-to-use-php-templates-in-block-themes/ or is there any other way which is recommended in a block theme?
- The topic ‘How to integrate more complex code in a block theme?’ is closed to new replies.