Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.
1 vote

Gutenberg add extra attributes to custom format

I was able to add the attribute by passing it in attributes through the registerFormatType settings: attributes: { 'custom-attr': 'custom-attr' }, then in edit(): toggleFormat( value, { ...
user avatar
  • 281
1 vote
Accepted

Very simple wordpress block to display posts from an api call

This is because when your block was rendered for save the API call had not finished. Save components do not run on the frontend. render() { return( <div> ...
user avatar
  • 51.9k
1 vote
Accepted

Javascript code inside "<# #>" in core WordPress files .php

These are Underscore Templates, handled by the wp.template() JavaScript function (source here) which takes in a template ID corresponding to a <script type="text/html" id="tmpl-{...
user avatar
  • 5,195
1 vote

the Customizer - proper way to instantiate an image upload control via javascript

You would just need to add a canUpload: true to your control's options (the 2nd parameter for wp.customize.Control) and then the .actions div would have an upload button. However, clicking the button ...
user avatar
  • 31.5k
1 vote

Move main menu to top of screen

This is a two step solution: Install plugin "Options for Twenty Seventeen" (Link) Add the following CSS to "Design" > "Customizer" > "Additional CSS" ....
user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible