Skip to content
Bottle of Brass

"He shook it, and found it to be heavy, and said, I must open it, and see what is inside."

  • Gutenberg,  WordPress

    Passing a PHP Variable to a Gutenberg Block

    August 12, 2022

    My challenge was how to apply a background image to a <div> in the Gutenberg admin panel. My solution was to add a variable to the head of the document that could be referenced in the block’s Javascript. The background image was then hardcoded as an inline style.

    Read More
    Michael Levy No Comments
  • Gutenberg,  Uncategorized

    Gutenberg Block errors that will return no or insufficient message.

    August 8, 2022

    The ‘save’ function wrapper HTML class attribute used the word ‘class’ instead of ‘classname’. Trying to link dynamic register script to js block. No errors just don’t work. block referenced but does not exist (not linked in block js) “http://localhost/vpf2/wp-admin/undefined 404 (Not Found)” [ ‘core/heading’, { placeholder: ‘Enter the main heading’, level: 1 } ] ‘Level needs to be numeric’

    Read More
    Michael Levy No Comments
  • Gutenberg,  Uncategorized,  WordPress

    Using custom image sizes in WordPress Gutenberg MediaUpload component

    August 3, 2022

    Read More
    Michael Levy No Comments
Savona Theme by Optima Themes