Gutenberg move post/page title to Editor sidebar document panel
Gutenberg move post/page title to Editor sidebar document panel
Gutenberg move post/page title to Editor sidebar document panel
Can’t find elemnts on the DOM using Custom Control in Customizer API
How to Use Webpack with WordPress Script Modules and Enqueue a Custom Class
I was bitten by this as well, and it caused me much frustration. I had exactly the same nested block duplication problem that you described above. I was able to solve this issue by specifying an apiVersion for my custom block. E.g.: registerBlockType(“custom-cafe-theme/custom-column”,{ apiVersion: 2, // or 3 title: “Custom Column”, attributes: { imgID: { … Read more
Actually, you do not need to worry about adding the Masonry’s script handle to the dependencies array in the asset file (index.asset.php). All you needed to do to make your Masonry code work properly is by using the script property to add the masonry (and imagesloaded) as dependencies for your editor and view/front-end scripts. “editorScript”: … Read more
I’m pasting the answer I got from a developer in the Gutenberg repository. Just add a webpack.config.js file at the root of your project with the following contents: const defaultConfig = require( ‘@wordpress/scripts/config/webpack.config’ ); module.exports = { …defaultConfig, entry: { …defaultConfig.entry(), index: ‘./src/index.js’, }, }; This will build all the blocks in /src/blocks/ folder and … Read more
Good News after 2 days! I resolved my issue, but I believe that wp i18n make-json does not generate the json file correctly. Why? Because it uses the ISO codes and not the locale (get_locale()) from the browser/user. So it isn’t “en_GB” that should be used but “en” in the .json file. This : “locale_data”: … Read more
I want to know if there’s a way to use subscribe so that when a pattern is added I can run something It’d be easy to do that if we had something like getPatterns() which would behave similar to getBlocks(), and/or if an inserted pattern (which could contain one or more blocks) had a comment … Read more
By setting the attributes that the variation is looking for. When you register a variation you’re also telling WordPress what attributes determine if a block is that variation. Figuring It Out From The Editor If we insert every variation of the group block and copy those blocks: Then paste them into a text editor ( … Read more
Figured it out! First I passed what Iceable suggested and also added moment script above, like so wp_register_script(‘moment’, “https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js”); wp_register_script( ‘fullcalendar’, “https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js”, array( ‘jquery’ ), null, true); and then I edited JS like so jQuery(function ($) { $(‘#calendar’).fullCalendar({ }) }); And it showed up!