TL;DR: WordPress plugin working (almost) like a child theme.
Sometimes the project you're thrown into doesn't have a child theme, or the customer doesn't want a child theme, or it is just not possbible for one reason or another. But you still want to add css, javascript, hooks, filters, ACF json, and so on. This happened to me, so I made Step child.
This is used on babaà.
- Upload
step-child
to the/wp-content/plugins/
directory. - Activate the plugin through the 'Plugins' menu in WordPress.
- Edit the scss file in step-child/scss/, and build, see below. And edit the js file in step-child/js/.
If you don't have sass on your computer simly open a terminal and run: gem install sass.
- Open terminal and run: sh watch-compressed.sh from
/your-install/wp-content/plugins/step-child/scss/
- This will watch style.scss and all included scss files for changes and build
../css/style.css
and../css/wp-admin.css
In the directory functions
there are three sub directories to keep this nice and tidy:
plugins
themes
wordpress
Add your custom code to a file in one of these three directories, where you see fit. If you have added a new file, add a require_once for your new file in index.php for that directory.
If you are using ACF all field groups are saved in the Step child plugin folder acf
- Initial release