Exemple #1
0
/**
 * Adds custom classes to the array of body classes.
 *
 * @param array $classes Classes for the body element.
 * @return array
 */
function govpress_body_classes($classes)
{
    if (is_404() || is_search()) {
        return $classes;
    }
    // Adds a class of group-blog to blogs with more than 1 published author.
    if (is_multi_author()) {
        $classes[] = 'group-blog';
    }
    // Body class for portfolio page template
    if (is_page_template('templates/full-page.php')) {
        $classes[] = 'full-width';
    }
    // Pages with children have a left sidebar layout applied
    if (govpress_is_page_parent(get_the_ID())) {
        if (!is_page_template('templates/full-page.php')) {
            $classes[] = 'layout-sidebar-left';
        }
    }
    return $classes;
}
Exemple #2
0
    get_template_part('content', 'page');
    ?>

				<?php 
    if (function_exists('yoast_breadcrumb')) {
        yoast_breadcrumb('<div class="breadcrumb">', '</div>');
    }
    ?>

				<?php 
    // If comments are open or we have at least one comment, load up the comment template
    if (comments_open() || '0' != get_comments_number()) {
        comments_template();
    }
    ?>

			<?php 
}
// end of the loop.
?>

		</div><!-- #main -->
	</div><!-- #primary -->

<?php 
if (govpress_is_page_parent(get_the_ID())) {
    get_sidebar('page-parent');
} else {
    get_sidebar();
}
get_footer();