Skip to main content

Create component

Cli allows you to create a component for loonar-wp theme.

Component init

  1. Run loonar create-component or loonar create-component NAME
  2. Provide answers to the questions

Questions with description

  1. Name - component name
  2. Scripts
  • JavaScript
  • Typescript - choose only if your compiler is adapted to use ts files
  • None - file will not be created
  1. PHP (functions.php file)
  • With fields - file with add_filter for ACF fields
  • With component data - file with add_filter for component data
  • With fields & component data - file with two above add_filter
  • Default - file with only namespace added