How to create a custom component in 6.1?
-
Hi, everyone.
I’m a react developer, currently being assigned to a project where the customer wants a WordPress theme. I’ve got my local development set up with MAMP, VSCode and a local installation of WP 6.1.
I need several custom components, which normally is straight forward jobs in React. I want to make reusable components for the users that look in a specific way. For instance, I would like to make a component that has a background with a specific background color border radius, that they can select and just enter text and one of the specified colors – like a “widget” in the classic themes.
Also, I will need an accordion “widget” with a specific style.
And down the line I need to be able to generate a form with very specific fields, checkboxes, the alignment and style of these, etc.
My question is – can I use the “Editor” to make these? If so, would that be the template parts? I tried to go into the template parts, but I couldn’t even find a normal text field in there, just a “Media and text” component.
All help highly appreciated.
- The topic ‘How to create a custom component in 6.1?’ is closed to new replies.