Skip to content

Configuration, setting, and naming

This document area is for theme designer/theme developer.
Before you start the step below, you need to know PHP, CSS, HTML and any markups/languages you have to use.

Config main column grid size

The Bootstrap Basic theme design on basic simple 3 columns (left, midle, right). But you can change layout to your design based on Bootstrap 3 grid layout. The example below is still based on basic simple multi columns.

Bootstrap use 12 grid layout. The Bootstrap Basic theme use automatic grid size calculation.
Let's say that we will design new theme with 2 columns (left sidebar, main).
The left sidebar grid size is 2 it means if left sidebar actived the main column grid size is 10, or if left sidebar is not actived the main column grid size is 12.

Open template-functions.php file in inc/template-functions.php and replace the code in bootstrapBasicGetMainColumnSize function with this code

if (is_active_sidebar('sidebar-left')) {
	// left sidebar actived
	$main_column_size = 10;
} else {
	// if no sidebar actived.
	$main_column_size = 12;
}

return $main_column_size;

Save the file and upload to the server.

Add more post formats

  1. Open the file: inc/functions.php
  2. Find add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link')); inside bootstrapBasicSetup function
  3. Add post format you want in that array. Example: add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link', 'audio', 'chat'));
  4. Save the file and upload to the server.

Add or remove widget area

  1. Open the file: inc/functions.php
  2. Find bootstrapBasicWidgetsInit function
  3. Add or remove widget area as you wish.
  4. Save the file and upload to the server.

Change text domain

The text domain is the name of text, string that ready for translate by use .po editor. You do not need to change the text domain but when you don't change you need to enter 'bootstrap-basic' as text domain in the source code.
To change text domain:
Search for 'bootstrap-basic' and replace it with your text domain name.