Wordpress Starter Theme
, (*1)
Starter theme based on Timber's Starter Theme. It is already part of Circul8 Wordpress Stack, can be also used with Root's Bedrock or normal Wordpress installation., (*2)
Installation
- Using Circul8 Wordpress Stack
composer create-project circul8/wordpress new-project
- Using Bedrock or normal Wordpress installation
- Navigate to
/web/app/themes/
or /wp-content/themes/
- Run
git clone git@github.com:circul8/wordpress-starter-theme.git
- Run
composer install
Dependencies
Templating system
Templating is done by Timber plugin which uses Twig., (*3)
Custom filters
Filter |
Description |
dump |
Dumps the variable to the Tracy's debug panel. |
cfs($post_id = NULL, $options = []) |
Returns CFS()->get($field_name, $post_id, $options) as descibred here where $field_name is filtered value. |
post |
Returns new Timber\Post($id) where $id is filtered value. |
image |
Returns new Timber\Image($id) where $id is filtered value. |
target |
Returns _blank or _self , expects Hyperlink Array from CFS. |
webalize |
Webalize string: "Hello, my friend!" -> "hello-my-friend" |
Plugins
Those ๐ are Must-Use plugins installed into mu-plugins
folder. If you install this theme from project's root using composer require
, those plugins may be installed into plugins
folder instead., (*4)
Plugin |
Description |
timber-library |
The core plugin to create custom theme. |
custom-field-suite |
To manage custom fields. |
wp-tracy |
Debugging, adds debug panel. |
disable-comments |
To disable comments. |
tinymce-advanced |
Advanced WYSIWYG. |
Directory structure
โโ assets โ Static files - images, CSS, LESS, gulp, JS, ...
โโ defaults โ Timber's starter theme twig files for fallback.
โโ pages โ Custom Wordpress template pages (.php)
โโ templates โ Custom twig templates.
โ โโ partials โ Components & other partials such as HTML header, footer, GA, ...
โโ admin.CSS โ Custom CSS sheet for administration.
โโ functions.php โ Theme boostrap