-
Notifications
You must be signed in to change notification settings - Fork 0
Adding Content Container Classes
Jim Reevior edited this page Aug 14, 2018
·
1 revision
By default, there are two content containers, outer and inner.
The outer content container is a <main>
tag and receives the following
classes:
.container
Filtering
<?php
/**
* Add a class to the outer content container.
*
* @param array $classes Outer content container classes
*
* @return array Outer content container classes.
*/
function mytheme_r_container_outer_class( $classes ) {
$classes[] = 'theme-outer-class';
return $classes;
}
add_filter( 'r_container_outer_class', 'mytheme_r_container_outer_class' );
The inner content container is a <div>
tag and receives one of the following
classes:
.content-container-narrow
.content-container
Filtering
<?php
/**
* Add classes to the inner content container when on a single profile.
*
* @param array $classes Inner content container classes
*
* @return array Inner content container classes.
*/
function mytheme_r_container_inner_class( $classes ) {
if ( is_singular( 'profile' ) ) {
$classes[] = 'my-custom-profile-class';
}
return $classes;
}
add_filter( 'r_container_inner_class', 'mytheme_r_container_inner_class' );
Get started
Configuration
Build child themes
- Customizing CSS in a child theme
- Overriding templates in a child theme
- Code patterns
- Code reviews
- Pulling in Foundation Updates
- Merging and Creating a Pull Request
Sass
Javascript
PHP
- Coding Standards
- PHP Constants
- Temp PHP Code Patterns
- PHP Snippets
- How to Use Hooks
- Action Hooks
- Using Action Hooks To Output Markup
- Filter Hooks
Shortcodes
Templates
GitHub
Tasks
Contribute to the framework
- Framework Development and Release Workflows
- Documentation Template
- Testing your changes
- Creating a new release
- Migration Guide
- Needs Documentation
Code Examples
- Adding Content Container Classes
- Adding News Templates
- Adding Script Dependencies
- Changing Available Layouts and Default Layout
- Displaying a Fancy Gallery
- Loading a Custom Build of Modernizr
- Loading Modernizr in the Footer
- Using Action Hooks To Output Markup
- Understanding get_template_part
BU Developer Resources