- This topic has 2 replies, 2 voices, and was last updated 3 weeks, 4 days ago by .
I am currently using MB Blocks to create custom blocks that will show certain elements based on the post they are being used in. To give an example, for example, I would like to show a list of categories based on the current post. When the page is rendered on the front end, all works well as the method get_the_id() returns the post's ID, however this is not being retrieved when in Gutenberg Editor, even after the post was published (so the ID exists). Is there any alternative to get_the_ID I can use in order to be able to show data in the preview/gutenberg editor?
- You must be logged in to reply to this topic.