-
Notifications
You must be signed in to change notification settings - Fork 18
Folder structure
Nicolas Juen edited this page Aug 3, 2018
·
15 revisions
The folders structure is defined by the means of the content in it.
The basic structure for the theme is like this :
├── assets
│ ├── acf
│ │ ├── json
│ │ └── php
│ ├── facetwp
│ └── searchwp
└── components
├── acf
├── blocks
├── loops
├── parts
└── templates
└── viewsThe assets folder contains all the static code for the configuration of the plugins like
- ACF
- SearchWP
- FacetWP
The goal of theses folders is to handle the .json and .php files needed for the configuration.
The files naming is for ACF
- JSON :
{group-slug}.json - PHP
{group_slug}.php
The files naming for SearchWP
- JSON :
config.json
The files naming for facetWP
- JSON :
config.json
Into the components directory we add all the theme files we need, theses files are bits of code included into our theme with get_template_part function.
The acffolder contains everything that can be chunked into an acf component, like flexibles and blocks.
The blocks folder contains generic parts of our code that we use accross our classic templates.
Like
-
pagenavi.phpcontaining the code for displaying pagenavi with function check. -
breadcrumb.phpcontaining the code for the breadcrumb and function check. -
related-news.phpdisplay the last news accross all the templates