Archived topic
Can dynamic data (e.g. featured image) be used on ANY block?
9 replies · Started by Clifford on June 3, 2021
Re: https://docs.generatepress.com/article/dynamic-data/
I want to add the core Image block but then set it to have dynamic data. Can you please enhance?
Hi Clifford,
The dynamic feature doesn't work with wp core image block, you can use GP's Dynamic image block. (the icon is GP logo)
I don't see that block anywhere in the Block Manager, not there at all, neither enabled nor disabled
The dynamic image block or any other dynamic feature options will only appear in GPP's block element, they won't show up in the page editor.
OK, so I'm asking for it to be available in the default page/post editor - please
Unfortunately, block/post editor is handled by WP, that's not something that GP can control, at least at this moment it's not possible.
Incorrect, it's a block, so it can be in any of the post editors for any post type.
Comment out the return at line 61 of wp-content/plugins/gp-premium/elements/class-block-elements.php to get it to appear when editing Posts, not just Elements
Hi Clifford,
The reason why we should not add any theme specific blocks to the default post/page block editor as this creates the theme-lock issue which WordPress doesn't like.
This means that when you switch a theme, that GP block will disappear and it might create an error like invalid block.
Ideally, if this option is needed, then WordPress should add a featured image block that works with all themes.
Hope this makes sense.
Could you please add it to the GP plugin, not the GP theme?
So far this is the first request on this but I'll bring it up for internal discussion.
Is the goal to insert the featured image wherever you want? If so you can consider using a shortcode solution:
https://generatepress.com/forums/topic/featured-image-shortcode/#post-715294
Thanks!