Hi all,
New to WordPress but experienced with HTML,CSS, JS and PHP. I’m developing a custom block theme and have run into a roadblock with some tricky (for me) functionality.
I’d like to have 2 buttons with some text content underneath. The text content would change depending on which button is active/clicked. It can all be hard-coded but I’d like to eventually extend it to be able to add x buttons and x text content, but that’s well out of my wheelhouse for now. My question is what would the workflow for something like this look like for you?
My understanding is I can:
1. Create a custom block within the theme. I understand this method isn’t officially supported by WP as changing themes would break that functionality?
2. Use create-block to build it in the top level plugin directory and work through the official dev docs to figure it out.
3. Add custom html in fse and some JS to get it working. This seems like the easiest method for me but feels like it’s just bypassing WP entirely and I wouldn’t actually learn anything.
If anyone could offer some insight or steer me towards some relevant docs that would be great.
Thanks
[ad_2]