-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from 1minus1limited/bump-package-versions
Update packages & CMB2
- Loading branch information
Showing
6 changed files
with
619 additions
and
854 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "includes/CMB2"] | ||
path = includes/CMB2 | ||
url = [email protected]:WebDevStudios/CMB2.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Skeleton Wordpress Theme | ||
# Skeleton WordPress Theme | ||
|
||
This repository contains a skeleton wordpress theme powered by brunch. | ||
This repository contains a skeleton WordPress theme powered by brunch. | ||
It uses yarn to compile and process packages and assets. | ||
|
||
## Prerequisites | ||
|
@@ -22,14 +22,14 @@ If you do not have a version of `php` installed or is below version `7.x.x`, | |
please upgrade it. `php 7` is recommended due to the performance improvements, | ||
view an upgrade guide [here](https://developerjack.com/blog/2015/12/11/Installing-PHP7-with-homebrew/) | ||
|
||
##To create a new Wordpress project: | ||
## To create a new WordPress project: | ||
|
||
```TXT | ||
mkdir your-wordpress-folder && cd your-wordpress-folder | ||
wp core download --locale=en_GB | ||
``` | ||
|
||
##Clone this repo into a new theme in your Wordpress folder: | ||
## Clone this repo into a new theme in your WordPress folder: | ||
|
||
```TXT | ||
cd wp-content/themes && rm -rf twenty* | ||
|
@@ -39,23 +39,24 @@ yarn | |
``` | ||
|
||
Note: the `rm -rf twenty*` simply removes the default WordPress themes as they | ||
are not required. The `yarn` command installs all the dependancies for this skeleton. | ||
are not required. The `yarn` command installs all the dependancies for this | ||
skeleton. | ||
|
||
You can now branch from master to make changes in this repo. | ||
|
||
To create a new wordpress theme repo from this skeleton run the following command | ||
to delete the current git files. | ||
To create a new WordPress theme repo from this skeleton run the following | ||
command to delete the current git files. | ||
|
||
```TXT | ||
rm -rf .git | ||
``` | ||
|
||
You can now create your new wordpress theme repository, following the repository | ||
You can now create your new WordPress theme repository, following the repository | ||
setup instructions on github. | ||
Once setup please ensure you amend the values in the `includes/constants.php` | ||
file to suit your theme. | ||
|
||
##Running the project | ||
## Running the project | ||
|
||
To start the mysql server use `mysql.server start` and `mysql.server stop` | ||
to stop. The default settings for a mysql connection are: | ||
|
@@ -68,10 +69,10 @@ port: 3306 | |
``` | ||
|
||
Use the mysql settings to make a new database for the project and complete the | ||
wordpress install at `http://localhost:8080`. | ||
WordPress install at `http://localhost:8080`. | ||
|
||
There are serveral commands available within this repo which are run as yarn scripts | ||
(recommend running in separate tabs in order to monitor output): | ||
There are several commands available within this repo which are run as yarn | ||
scripts (recommend running in separate tabs in order to monitor output): | ||
|
||
- `yarn run server` - will start the PHP built-in web server allowing for | ||
access to the site via `http://localhost:8080` | ||
|
@@ -107,20 +108,23 @@ When entering these database details into the WordPress setup screen, ensure | |
that the host field is set to `127.0.0.1` rather than `localhost` otherwise you | ||
will receive a connection error. | ||
|
||
When adding node packages to this repo, the `--save` option should be used unless the | ||
package contents will only ever be used within the dev environment | ||
(`devDependencies`). For example, the `auto-reload-brunch` offers local | ||
reloading of pages to show instant styling changes, which would not be suitable | ||
for a live server environment. | ||
When adding node packages to this repo, the `--dev` option should be used for | ||
any packages that are required to run the development environment, prior to the | ||
build/compilation of the app. Otherwise, if a package affects the way in which | ||
the code is written, it should sit under the `dependencies` section. | ||
For example, the `auto-reload-brunch` offers local reloading of pages to show | ||
instant styling and js changes, which would not be suitable for a live server | ||
environment, therefore should have the `--dev` flag used to add it. | ||
|
||
## Install/Update CMB2 within project | ||
|
||
This project uses the [CMB2](https://github.com/WebDevStudios/CMB2) library | ||
to help generate and manage custom metaboxes within the WP admin. It is | ||
included within this project via submodule. | ||
|
||
To add CMB2 library to the project run the following command within the theme | ||
directory you wish to add the CMB2 library into: | ||
To add CMB2 library to the project (this is not required when using this as a | ||
started framework), run the following command within the theme directory you | ||
wish to add the CMB2 library into: | ||
|
||
`git submodule add [email protected]:WebDevStudios/CMB2.git` | ||
|
||
|
@@ -135,16 +139,16 @@ repo), run the following command: `git submodule update`. | |
NB: The CMB2 files are not committed directly within this repo as there should | ||
be no reason to change the library code. | ||
|
||
##Testing | ||
## Testing | ||
|
||
The server will allow for devices connected on the same wifi to access the | ||
site. On your device go to the IP address + `xip.io:8080`. | ||
To find your IP address hold `ALT` and click on the wifi icon in your toolbar. | ||
|
||
##Additional Skeleton file notes | ||
## Additional Skeleton file notes | ||
|
||
There are several files within this skeleton which contain examples of functionality | ||
for your wordpress theme. | ||
There are several files within this skeleton which contain examples of | ||
functionality for your WordPress theme. | ||
|
||
For example: | ||
- `includes/class.custom-post-types.php` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule CMB2
updated
from 6dacea to 7699bd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.