Categories
CMS Mastering Development Wordpress

Multiple Select on Gutenberg Sidebar as metakey

I want to show a multiple select element in the sidebar when editing a page in admin, where I can save the selected values in a metakey. Of course also load the selected values upon load of page-edit in admin. I manage to show the list, but I don’t know how to save it i […]

Categories
CMS Development Wordpress

Gutenberg translation is not working

I have followed the documentation of WordPress on translating Gutenberg block, I have used WP CLI to create the .pot, .po and .json file and uploaded to my langauges folder inside the folder of that plugin, but still it is not working. Can someone tell me whats wrong with my code? PHP: function custom_blocks_load_plugin_textdomain() { […]

Categories
CMS Development Wordpress

Custom dynamic Gutenberg block not rendering

I am creating a dynamic Block to display a widget area inside post. I coded the following in ES5. The block was registered successfully, but it has failed to render the I want. I have looked up a lot of tutorials, but I am not sure what I have missed. php code: function registerWidgetBlockArea() { […]

Categories
CMS Development Wordpress

Loading a plugin’s js file from functions.php

I’m trying to change the way a plugin register’s its own js file from this: function gpvd_enqueue_styles_admin() { wp_enqueue_style( ‘gpvb-admin-styles’, plugin_dir_url( __FILE__ ) . ‘css/admin.css’, array(), ”, ‘all’ ); wp_register_script( ‘gpvb-admin-scripts’, plugins_url( ‘js/block.js’, __FILE__ ), array( ‘wp-blocks’, ‘wp-components’, ‘wp-element’, ‘wp-i18n’, ‘wp-editor’ ), filemtime( plugin_dir_path( __FILE__ ) . ‘js/block.js’ ), false ); wp_enqueue_script( ‘gpvb-admin-scripts’ ); } […]