This repository contains the example code for the 10up Block Based Theme Training course.
This project is structured same as any other 10up WordPress project that was scaffolded using the wp-scaffold. The project is a WordPress installation with a custom theme and a custom plugin. The theme is a block-based theme. The plugin contains some logic such as custom post types and custom taxonomies.
- Clone this repository as the
wp-contentdirectory in a WordPress installation. - Run
npm installin thewp-contentdirectory. - Run
composer installin thewp-contentdirectory. - Run
composer installin thewp-content/themes/10up-block-themedirectory. - Run
composer installin thewp-content/mu-plugins/10up-plugindirectory. - Run
npm run startin thewp-contentdirectory. - Add the following to your
wp-config.phpfile:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'SCRIPT_DEBUG', true );
define( 'WP_DEVELOPMENT_MODE', 'all' );- Visit the WordPress admin and activate the
10up Block Themetheme
Once your site is set up, import the sample movie and person content:
# Import the 30 default movies + their star cast
wp fueled-movies import
# Import only specific movies + their cast
wp fueled-movies import --ids=tt0910970,tt0068646
# Preview without creating posts
wp fueled-movies import --dry-run
# Override default star limit (default: 3 per movie)
wp fueled-movies import --star-limit=5