Carrington Build Documentation

Rows Directory Structure

Rows are loaded in the same manner as Modules are loaded. The loading process is based on the parent Rows directory containing folders of rows.

- rows/
	- 1col
		- 1col.php
		- icon.png

Defining Row Load Directories

Carrington Build automatically loads rows by scanning directories for compatible file structures much like WordPress loads Plugins by scanning the Plugins directory. To define a row load directory, add a function that runs on the `cfct-row-dirs` filter. For example, to add a modules directory in your theme directory use the code:

function my_register_row_dir($dirs) {
	array_push($dirs, trailingslashit(get_stylesheet_directory()).'rows');
	return $dirs;
add_filter('cfct-row-dirs', 'my_register_row_dir', 11);

Alternatively, explicitly include a row definitions from a theme’s functions.php or within a plugin, in the action hook cfct-rows-loaded:

function register_my_special_rows() {
	        include_once($path_to_my_code . "/rows/special-rows.php");
add_action('cfct-rows-loaded', 'register_my_special_rows');

See also:

Back to Carrington Build

These sections are available to the public. The remaining sections are available exclusively to customers.