I’ll add a check for the text-blocks folder to the next release.
Good idea!
Hal
@halgatewood: And could you please also take a look at the following issues,
they are quite blocking for some users:
https://ww.wp.xz.cn/support/topic/nesting-doesnt-work/
https://ww.wp.xz.cn/support/topic/retrieving-via-slug-conflicts-with-polylang/
-
This reply was modified 8 years, 4 months ago by
strarsis.
Ok, so I can see addition of filter in latest version but I’m stuck as to how to implement it as {template} name required in any additions. Maybe I’m being thick byt could you please posty code snippet as to how you would specificy additional location? Thanks
Version 1.5.3 looks for a text-blocks folder as well now. With this new filter, you can remove the template logic altogether and just create text-blocks.php file that catches all blocks:
https://halgatewood.com/docs/plugins/reusable-text-blocks/filters-available#text_blocks_template_location
The template variable is simply so you can target different blocks with different custom code.
Thanks for quick reply but I’m missing something. When I create this function I get error message “Undefined variable: template”… I don’t understand what to set $template to in my function, and ommitting it then fails to pick up template.
Note: I keep all templates in /template-parts/ off the main theme folder. So within that folder I have my /text-blocks/ folder.