circul8/wordpress-starter-theme

Starter theme to build a Timber theme

Installs: 79

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 271

Open Issues: 1

Type:wordpress-theme

dev-master / 1.0.x-dev 2018-06-15 02:22 UTC

This package is not auto-updated.

Last update: 2024-05-12 00:37:24 UTC


README

Packagist

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.

Installation

  1. Using Circul8 Wordpress Stack
    1. composer create-project circul8/wordpress new-project
  2. Using Bedrock or normal Wordpress installation
    1. Navigate to /web/app/themes/ or /wp-content/themes/
    2. Run git clone git@github.com:circul8/wordpress-starter-theme.git
    3. Run composer install

Dependencies

Templating system

Templating is done by Timber plugin which uses Twig.

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.

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