• 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.

    • This topic was modified 2 years, 4 months ago by arnepedersen.
    • This topic was modified 2 years, 4 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Your “components” sound like custom blocks to me. You wouldn’t be using the editor per se, you’re creating blocks for end user use within the block editor. The so called WP widgets are also blocks. “Widget” is becoming a legacy term.

    Blocks are the basic elements end users interact with. Your blocks would contain primitive elements called components. End users do not interact with components, developers do. The WordPress environment uses specific terminology for certain elements. The terms often have generic meaning beyond WordPress. It gets confusing when people use generic terms for things that have a different specific meaning within WordPress. For clearer communication with others you’ll want to attempt to use the proper terminology. It’ll take time to wrap your head around the proper WP jargon. I’m confident you’ll get there soon enough. Good luck and have fun ??

Viewing 1 replies (of 1 total)
  • The topic ‘How to create a custom component in 6.1?’ is closed to new replies.