Getting Started with Method v2
Overview
Method is a WordPress parent theme and block framework designed to accelerate block theme development. It provides a library of custom blocks with responsive controls, a Bootstrap-based grid system, and a structured architecture for building highly-custom WordPress sites.
The Method ecosystem consists of three repositories that work together:
- Method – The parent theme that provides the block framework, responsive controls system, and core functionality.
- Method Child – A starter child theme template for building your project on top of Method.
- Method Generator – A Gulp/Nunjucks-powered tool that creates customized builds of Method Child, pre-configured with your project’s name and slug.
This guide walks you through setting up a new project from scratch.
Prerequisites
Before you begin, make sure you have the following installed and available:
- A local WordPress development environment (e.g., Valet, LocalWP, MAMP, Lando, wp-env, or similar)
- Node.js and npm – Required for both Method Generator and for the child theme’s build tools
- Gulp CLI – Required to run automated tasks for CSS and JS compilation, live preview, and more
- Git (recommended) – For version control of your child theme
- A code editor (e.g., VS Code)
- WordPress 6.7 or later
Download the Latest Releases
Start by downloading the latest release archives from each of the three repositories.
Method (Parent Theme)
Go to github.com/pixelwatt/method/releases and download the Source code (zip) for the latest release.
Method Generator
Go to github.com/pixelwatt/method-generator/releases and download the Source code (zip) for the latest release.
Method Child (Reference)
You do not need to download Method Child directly — Method Generator includes it as a Git submodule and will generate a customized copy for you. However, the repo is available at github.com/pixelwatt/method-child/releases if you want to review the template source.
Generate Your Child Theme
Method Generator uses Gulp and Nunjucks to create a customized build of Method Child with your project’s name, slug, and text domain already in place.
To generate a custom build of Method Child:
Step 1: Extract the Method Generator zip to a working directory (this can be anywhere — it doesn’t need to be in your WordPress installation).
Step 2: Open a terminal and navigate into the extracted method-generator directory.
Step 3: Install dependencies (NPM and Gulp CLI must already be installed):
npm install --save-devStep 4: Copy the configuration defaults file (_globals-defaults.html) to a new file (_globals.html)
cp njk/templates/_globals-defaults.html njk/templates/_globals.htmlStep 5: In an editor of your choice, modify njk/templates/_globals.html to reflect your project. Once finished, save your changes, ensuring that you’re saving to the new _globals.html and not _globals_defaults.html
Below is the file originally generated for Cortlandt, the compiled version of Method Child that powers this site.
{#
GLOBAL VARIABLES:
Use this file to reconfigure core components of the Method theme prior to building.
#}
{# ---------------------------------------------------------------- #}
{# Theme Information #}
{# ---------------------------------------------------------------- #}
{% set theme_name = "Cortlandt" %}
{% set theme_uri = "https://method.wiki" %}
{% set theme_description = "This block theme powers the Method Wiki." %}
{% set theme_version = "1.0.0-dev1" %}
{% set theme_license = "GNU General Public License v2 or later" %}
{% set theme_author = "Rob Clark" %}
{% set theme_author_uri = "https://robclark.io/" %}
{% set theme_tags = "Block Editor, CMB2, Method v2" %}
{# ---------------------------------------------------------------- #}
{# Code #}
{# ---------------------------------------------------------------- #}
{% set code_textdomain = "cortlandt" %}
{% set code_prefix = "cortlandt_" %}
{% set css_prefix = "cortlandt" %}
{# ---------------------------------------------------------------- #}
{# Local Development #}
{# ---------------------------------------------------------------- #}
{% set localdev_url = "method-wiki.test" %}Step 6: Run the build-custom task to copy and rebuild Method Child based off of the settings provided in _globals.html
gulp build-customStep 7: From the terminal, move into the new custom/ folder and ensure that no unintended dev directories were copied over from Method Child, removing any if found (.git/, .node_mobules/, etc)
# Move into folder
cd custom/
# Check directory contents
ls -la
# Remove dev directories if found
rm -rf .git/
rm -rf node_mobules/Step 8: From here, either initialize an empty Git repo inside of custom/, commit all files, add and push to remote, and clone into your local WordPress installation’s wp-content/themes/ folder (recommended), or move custom/ into wp-content/themes/
Don’t activate the theme yet. We’ll get to that in the next section.
Install Both Themes
Step 1: Extract the Method parent theme zip. Rename the extracted folder to method (removing version suffixes) and place it in your WordPress wp-content/themes/ directory.
Step 2: If you haven’t already, copy your generated child theme folder from Method Generator’s custom/ directory into wp-content/themes/ as well.
Step 3: In the WordPress admin, go to Appearance → Themes.
Step 4: You should see both Method and your child theme listed. Activate the child theme (not the parent). WordPress will automatically use Method as the parent.
Do not activate the Method parent theme directly. Always activate the child theme, which inherits from Method.