/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function siteorigin_north_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } $classes[] = 'no-js'; $classes[] = 'css3-animations'; $classes[] = 'responsive'; if (is_page()) { $classes[] = 'page-layout-' . SiteOrigin_Settings_Page_Settings::get('layout'); $classes[] = 'page-layout-menu-' . SiteOrigin_Settings_Page_Settings::get('menu'); if (!SiteOrigin_Settings_Page_Settings::get('masthead_margin')) { $classes[] = 'page-layout-no-masthead-margin'; } if (!SiteOrigin_Settings_Page_Settings::get('footer_margin')) { $classes[] = 'page-layout-no-footer-margin'; } } if (!is_active_sidebar('main-sidebar')) { $classes[] = 'no-active-sidebar'; } if (siteorigin_setting('navigation_sticky')) { $classes[] = 'sticky-menu'; } if (wp_is_mobile()) { $classes[] = 'is_mobile'; } return $classes; }
/** * Setup Page Settings for SiteOrigin North */ function siteorigin_north_setup_page_settings() { SiteOrigin_Settings_Page_Settings::single()->configure(array('layout' => array('type' => 'select', 'label' => __('Page Layout', 'siteorigin-north'), 'options' => array('default' => __('Default', 'siteorigin-north'), 'no-sidebar' => __('No Sidebar', 'siteorigin-north'), 'full-width' => __('Full Width', 'siteorigin-north'))), 'menu' => array('type' => 'select', 'label' => __('Menu Position', 'siteorigin-north'), 'options' => array('default' => __('Default', 'siteorigin-north'), 'overlap' => __('Overlaps Content', 'siteorigin-north'))), 'page_title' => array('type' => 'checkbox', 'label' => __('Page Title', 'siteorigin-north'), 'checkbox_label' => __('display', 'siteorigin-north'), 'description' => __('Display the page title on this page.', 'siteorigin-north')), 'masthead_margin' => array('type' => 'checkbox', 'label' => __('Masthead Bottom Margin', 'siteorigin-north'), 'checkbox_label' => __('enable', 'siteorigin-north'), 'default' => true, 'description' => __('Include the margin below the masthead (top area) of your site.', 'siteorigin-north')), 'footer_margin' => array('type' => 'checkbox', 'label' => __('Footer Top Margin', 'siteorigin-north'), 'checkbox_label' => __('enable', 'siteorigin-north'), 'default' => true, 'description' => __('Include the margin above your footer.', 'siteorigin-north')))); }
<main id="main" class="site-main" role="main"> <?php while (have_posts()) { the_post(); ?> <?php get_template_part('template-parts/content', 'page'); ?> <?php // If comments are open or we have at least one comment, load up the comment template. if (comments_open() || get_comments_number()) { comments_template(); } ?> <?php } // End of the loop. ?> </main><!-- #main --> </div><!-- #primary --> <?php if (SiteOrigin_Settings_Page_Settings::get('layout') == 'default') { get_sidebar(); } get_footer();
* The template used for displaying page content in page.php * * @package siteorigin-north */ ?> <article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <?php if (SiteOrigin_Settings_Page_Settings::get('page_title')) { ?> <header class="entry-header"> <?php the_title('<h1 class="entry-title">', '</h1>'); ?> </header><!-- .entry-header --> <?php } ?> <div class="entry-content"> <?php the_content(); ?> <?php