Support » Developing with WordPress » How to create custom block by theme?

  • I’m creating a theme. And according to the designer’s instructions, some blocks must contain specific markup and javascript logic (for example, react to a user’s click).

    I can’t find any information on how to create custom blocks by theme instead of individual plugins.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz


    I’m not a theme dev, but AFAIK you can create blocks in a theme the same way as we would for a plugin. All the related code executes either way. The only difference is plugins load early and themes relatively late. Whatever docs you find on block creation, anywhere you see “plugin”, substitute “theme” 🙂

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.