Using webpack to add customizer live preview functionality – wp.customize is not a function
Using webpack to add customizer live preview functionality – wp.customize is not a function
Using webpack to add customizer live preview functionality – wp.customize is not a function
Checks when fetching data from multiple REST API endpoints in Gutenberg
WordPress customizer get control
You’ll need to use JavaScript. To get the width and height of the screen: <script> var height = window.screen.height; var width = window.screen.width; </script> To properly take into account higher resolution devices, like Apple’s ‘retina’ displays you will want to multiply those values by the ‘pixel ratio’: <script> var pixelRatio = window.devicePixelRatio; var height = … Read more
Popup box when Clicking on Insert into post button in wordpress
Sometimes a WordPress appliance service or a plugin makes a change to insert content in the footer of web pages at the web server level. If this was done here this can make it harder to find and remove. If your webserver is Apache try seeing if this file exists: /etc/apache2/mods-enabled/substitute.conf and then take a … Read more
How to add classes and events to image in javascript using Gutenberg?
How to retrieve data from database, then pass it to Javascript?
Yes, you can do this via the classnames() function. import classnames from ‘classnames’; const withClass = createHigherOrderComponent( ( BlockListBlock ) => { return ( props ) => { let wrapperProps = props.wrapperProps; wrapperProps = { …wrapperProps, className={ classnames( ‘my-custom-class’, props.className ) } }; return <BlockListBlock { …props } wrapperProps={ wrapperProps } />; }; }, ‘withClass’ … Read more
This was solved for me by Brandon Payton on WordPress.org’s Gutenberg support forum: https://wordpress.org/support/topic/open-featured-image-modal-in-wordpress-gutenberg-onclick-of-a-button/ He was even awesome enough to create a gist: https://gist.github.com/brandonpayton/2c30c6175702adb12a093cf258d754d2 You the man Brandon!!