Relative links in Gutenberg

It doesn’t have anything to do with Gutenberg. It’s just the way WordPress stores links in the main content. Anytime you add a link in the WP editor, it automatically puts in the absolute path. ACF and other forms of custom postmeta instead store the post ID, so whenever its slug/permalink changes they are automatically … Read more

How Migrate a Legacy Widget to block?

TLDR: If you wanted to update to v5.8 you don’t need to do anything to make widgets work, they won’t break if you update. There is no conversion step, no updating of code to make it work. migration is not necessary. I’m trying to tranform legacy widgets to block, I was reading the docs, but … Read more

Getting taxonomies associated with a specified post type

Yes, you can pass a post type to getEntityRecords() and also getTaxonomies(), both using the same format which is an object of arguments: Using getEntityRecords(): wp.data.select( ‘core’ ).getEntityRecords( ‘root’, ‘taxonomy’, { type: ‘post’ } ) Using getTaxonomies(): ( which is actually a shorthand for the above code ) wp.data.select( ‘core’ ).getTaxonomies( { type: ‘post’ } … Read more

Working with external library in gutenberg block

So the important thing to understand here is that while the block editor is React based, and can use React components, the data it saves is purely HTML. So your block will simply save the HTML output of its save() function to the post’s content in the database. When that content is output on the … Read more

LinkControl – how to toggle opensInNewTab

This is covered in the documentation section directly above the one you linked, for value: A link value is composed of a union between the values of default link properties and any custom link settings. The resulting default properties of value include: url (string): Link URL. title (string, optional): Link title. opensInNewTab (boolean, optional): Whether … Read more