• Here’s the situation. I have a custom block named Payment Buttons. Inside that, I want to add as many buttons as I need. Each button should have a dropdown with a selectable list of links.

    the challenge here is to detect the buttons are in a specific parent and add that dropdown to only those buttons, not to all button components.

    I’m ready to explain more if it’s required. Can anyone give any suggestion?

    Thanks!

    • This topic was modified 1 year, 3 months ago by Deryck.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Are you considering javascript to addit ‘after’ the fact? i.e. on load select container, loop through all the button children add drop down

    Thread Starter Deryck

    (@deryck)

    Thanks @alanfuller. Yes, I have considered that. However, I try to stick to the block editor API.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding custom attributes to core blocks if they have a specific parent’ is closed to new replies.