This section will help you understand how to fully customize your Atom child theme, or why not, develop your own Atom theme from scratch.

Note that only relevant methods or filters will be listed here.

Working with template files

“Templates” include all the .php files that you find in the theme root folder, minus the functions.php file.

To call Atom methods you can use the $app variable, which is by default exposed in all templates. Outside templates you’ll need to use Atom::app() instead (or create a reference with $app = &Atom::app();).

If you’re building your own child theme, you can obviously strip out all option checks and handling from the template you are customizing.

Basic config – child functions.php

Keep in mind that all settings mentioned here are optional. Leaving them out will tell WordPress to use the parent theme’s settings. So here is an example basic configuration of a child theme functions.php file:

define('ATOM', 'your_theme_id');

This is the unique ID of the theme, and it’s mainly used for localization and key for storing theme options. If you need to override the ID of the parent theme, simply define your own. Note that it can only contain letters, numbers and the underscore character.

define('ATOM_DEV_MODE', TRUE);

Activates development mode. Useful while you’re developing your theme on localhost.

define('ATOM_EXTEND', FALSE);

This constant is only valid in a parent theme, and if enabled it tells Atom to automatically create and activate a child of that parent theme.

define('ATOM_LOG_VIEWS', FALSE);

Set it to false to disable post view logging.

require_once '../mystique/core/Atom.php';

Includes the Atom class. This is required if you will be using any methods like the ones below. Change the path depending on the theme you use and location.

Atom::app()->setContextArgs('document_title', array(
  'singular_post_parents'  => array('page'),
  'singular_object_labels' => array('some_cpt', 'another_cpt'),
));

Here’s where you can modify functionality or extend the core. In this example we are enabling a breadcrumb-like document title for the “Page” post type, and adding labels for the some_cpt and another_cpt post types.

Atom::app()->setActiveWidgets('Splitter', 'Tabs');

Another example, in which we disable all Atom widgets, besides the “Tabs” and “Splitter” widgets.