This is a starter kit for wordpress theme and plugins devleop. It's a result of many projects and template that was built over the years.
-
mkdir ${name}
-
cd ${name}
-
wp core download
-
rm -rf wp-content/plugins
-
rm -rf wp-content/themes
-
mkdir wp-content/plugins
-
mkdir wp-content/themes
-
git clone [email protected]:nemo369/canaan_empty.git temp
-
rsync -vua --delete-after temp/ .
-
rm -rf temp
-
rm -rf .git
-
composer install --no-dev --optimize-autoloader
-
npm install
-
npm run build
-
mv example.gitignore .gitignore
-
git init
I'm compilng all the theme assets using vite
check the Index.js file in canaan theme folder. the idea behind this structre is to gernate one big JS file that will be cached. each page will have a JS class that will be loaded only if a certain DOM elment is in the page.
im using 1.Tailwind should be used before wrtiting any new lines of CSS
- Reset CSS completely
- SCSS for spliting files. have a look in the style.scss for better understaing of the structe.
- BEM
with an svg.php file and a simple switch case
Using a Third party libray called Carbon Fields look at carbon.php and for example at carbon_post.php
look at register_post_type.php file
clone and paste all this content in a brand new WP instalation.
- Make sure to add ๐ข
include dirname(__FILE__).'/canaan_conf.class.php';
to wp-config.php file ๐ข
then go to wp-content/theme/canaan and
npm install
composer install --no-dev --optimize-autoloader
npm run dev
โค๏ธ