Skip to content

Instantly share code, notes, and snippets.

@hirozed
Last active January 25, 2021 21:01
Show Gist options
  • Save hirozed/2b514745fa751efeecbb7f0cbb6dbe6b to your computer and use it in GitHub Desktop.
Save hirozed/2b514745fa751efeecbb7f0cbb6dbe6b to your computer and use it in GitHub Desktop.
BU Theme Component Structure
<?php
/**
* [Comonent Name]
*
* @package [changeme]
*/
namespace BU\Responsive\Theme\[theme_name]\[component name];
use function BU\Responsive\Theme\Diversity\trim_words;
// Set up constants for post type and taxonomies.
define( 'R_[THEME]_[COMPONENT]_CPT', '[cpt]' );
define( 'R_[THEME]_[COMPONENT]_[TAXONOMY]', '[taxonomy]' );
// Required files.
require __DIR__ . '/taxonomies.php';
require __DIR__ . '/post-type.php';
require __DIR__ . '/cmb2.php';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment