Skip to content

Commit 62c73e7

Browse files
committed
docs: reorganize sections for more logical flow
1 parent ad576a6 commit 62c73e7

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed

README.md

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ Out of the box, this template provides a minimal WordPress theme with basic supp
2323

2424
## Table of Contents
2525

26-
| Developer Documentation |
27-
| --------------------------------------------------- |
28-
| [Quickstart](#quickstart) |
29-
| [Customization](#customization) |
30-
| [Local Development Setup](#local-development-setup) |
31-
| [WordPress](#wordpress) |
32-
| [Project Structure](#project-structure) |
33-
| [Generators](#generators) |
34-
| [Plugins](#plugins) |
35-
| [Custom Blocks](#custom-blocks) |
36-
| [Deployment](#deployment) |
37-
| [How to Contribute](./CONTRIBUTING.md) |
38-
| [Code of Conduct](./CODE_OF_CONDUCT.md) |
26+
| Developer Documentation |
27+
| --------------------------------------------------------- |
28+
| [Quickstart](#quickstart) |
29+
| [Customization](#customization) |
30+
| [Local Development Setup](#local-development-setup) |
31+
| [WordPress](#wordpress) |
32+
| [Project Structure](#project-structure) |
33+
| [Plugins](#plugins) |
34+
| [Generators](#generators) |
35+
| [Implementing Custom Blocks](#implementing-custom-blocks) |
36+
| [Deployment](#deployment) |
37+
| [How to Contribute](./CONTRIBUTING.md) |
38+
| [Code of Conduct](./CODE_OF_CONDUCT.md) |
3939

4040
## Quickstart
4141

@@ -352,6 +352,42 @@ The `php/` directory holds the PHP template files for the WordPress theme. Other
352352
- `partials` - Twig templates for components or pieces of the page to be reused should go here.
353353
- `shortcodes` - Twig templates for shortcodes should go here.
354354

355+
## Plugins
356+
357+
### Installing Plugins
358+
359+
Install plugins via `composer` by running `npm run php:run composer require wpackagist-plugin/<plugin-name>:<version-number-or-range>`. For example:
360+
361+
```sh
362+
# install a specific version/range for advanced-custom-fields
363+
npm run php:run composer require wpackagist-plugin/advanced-custom-fields:^6.1
364+
365+
# or just install the latest version, letting composer resolve the range
366+
npm run php:run composer require wpackagist-plugin/advanced-custom-fields
367+
```
368+
369+
Running this command will update `composer.json` and `composer.lock`, but you will need to rebuild (`docker compose build`) and restart your container (`npm start` or `npm run serve:dev`) to see the new plugin reflected in the WordPress admin.
370+
371+
### Updating Plugins
372+
373+
You can run `composer require` as above to update existing plugins, or you can do the following.
374+
375+
1. Update the version number in the "require" list in `composer.json`.
376+
1. Run `npm run php:run composer update` to update `composer.lock`.
377+
378+
Again, you'll need to rebuild and restart your container to see the changes reflected in WordPress.
379+
380+
### Recommended Plugins
381+
382+
This is a non-comprehensive list of plugins that we have found useful on other projects.
383+
384+
- [Metabox][metabox]
385+
- [Advanced Custom Fields][advanced-custom-fields]
386+
- [Yoast SEO][yoast-seo]
387+
- [Google Site Kit][google-site-kit]
388+
- [Contact Form 7][contact-form-7]
389+
- [Rollbar][rollbar]
390+
355391
## Generators
356392

357393
We have a handful of generators to make it easier to add new custom post types, taxonomies, shortcodes, and page templates. If none of the generators give you what you need, you can try using https://generatewp.com/ to get more relevant code snippets.
@@ -489,45 +525,9 @@ The following file will be created based on your input:
489525

490526
[Meta Box documentation](https://developer.wordpress.org/plugins/metadata/custom-meta-boxes/)
491527

492-
## Plugins
493-
494-
### Installing Plugins
495-
496-
Install plugins via `composer` by running `npm run php:run composer require wpackagist-plugin/<plugin-name>:<version-number-or-range>`. For example:
497-
498-
```sh
499-
# install a specific version/range for advanced-custom-fields
500-
npm run php:run composer require wpackagist-plugin/advanced-custom-fields:^6.1
501-
502-
# or just install the latest version, letting composer resolve the range
503-
npm run php:run composer require wpackagist-plugin/advanced-custom-fields
504-
```
505-
506-
Running this command will update `composer.json` and `composer.lock`, but you will need to rebuild (`docker compose build`) and restart your container (`npm start` or `npm run serve:dev`) to see the new plugin reflected in the WordPress admin.
507-
508-
### Updating Plugins
509-
510-
You can run `composer require` as above to update existing plugins, or you can do the following.
511-
512-
1. Update the version number in the "require" list in `composer.json`.
513-
1. Run `npm run php:run composer update` to update `composer.lock`.
514-
515-
Again, you'll need to rebuild and restart your container to see the changes reflected in WordPress.
516-
517-
### Recommended Plugins
518-
519-
This is a non-comprehensive list of plugins that we have found useful on other projects.
520-
521-
- [Metabox][metabox]
522-
- [Advanced Custom Fields][advanced-custom-fields]
523-
- [Yoast SEO][yoast-seo]
524-
- [Google Site Kit][google-site-kit]
525-
- [Contact Form 7][contact-form-7]
526-
- [Rollbar][rollbar]
527-
528-
## Custom Blocks
528+
## Implementing Custom Blocks
529529

530-
We have two [generators](#generators) that can be used in tandem to create the necessary scaffolding for custom blocks. The first is `npm run generate:custom-blocks-plugin`, which should be run first to create the plugin config, readme, directory, and `package.json`/`docker-compose.yml` changes necessary to make the plugin available to WordPress. The second is `npm run generate:custom-block`, which creates the boilerplate files necessary to create a single custom block within the plugin.
530+
To implement custom blocks, begin by using the two [generators](#generators) in tandem to create the necessary scaffolding for custom blocks. The first is `npm run generate:custom-blocks-plugin`, which should be run first to create the plugin config, readme, directory, and `package.json`/`docker-compose.yml` changes necessary to make the plugin available to WordPress. The second is `npm run generate:custom-block`, which creates the boilerplate files necessary to create a single custom block within the plugin.
531531

532532
Note: you will need to restart your development process to pick up the changes after adding a custom blocks plugin and/or a custom block.
533533

0 commit comments

Comments
 (0)