<?php /** * The Template for displaying all single posts. * * @package Pindol * @author Muffin group * @link http://muffingroup.com */ get_header(); $sidebar = mfn_sidebar_classes(); ?> <!-- #Content --> <div id="Content"> <div class="container"> <!-- .content --> <?php if ($sidebar) { echo '<div class="content">'; } echo '<div class="the_content the_content_wrapper">'; while (have_posts()) { the_post(); get_template_part('includes/content', 'single'); } echo '</div>'; if ($sidebar) { echo '</div>'; } else {
function mfn_body_classes($classes) { // Layout | Custom ------------------------------------ $layoutID = mfn_layout_ID(); // Slider --------------------------------------------- if (mfn_slider()) { $classes[] = 'template-slider'; } // Sidebar -------------------------------------------- $classes[] = mfn_sidebar_classes(); // Skin ----------------------------------------------- if ($_GET && key_exists('mfn-c', $_GET)) { $classes[] = 'color-' . $_GET['mfn-c']; // demo } elseif ($layoutID) { $classes[] = 'color-' . get_post_meta($layoutID, 'mfn-post-skin', true); } else { $classes[] = 'color-' . mfn_opts_get('skin', 'custom'); } // Style | Default & Simple --------------------------- if ($_GET && key_exists('mfn-style', $_GET)) { $classes[] = 'style-' . $_GET['mfn-style']; // demo } else { $classes[] = 'style-' . mfn_opts_get('style', 'default'); } // Layout | Full Width & Boxed ------------------------ if ($_GET && key_exists('mfn-box', $_GET)) { $classes[] = 'layout-boxed'; // demo } elseif ($layoutID) { $classes[] = 'layout-' . get_post_meta($layoutID, 'mfn-post-layout', true); } else { $classes[] = 'layout-' . mfn_opts_get('layout', 'full-width'); } // One Page ------------------------------------------- if (get_post_meta(mfn_ID(), 'mfn-post-one-page', true)) { $classes[] = 'one-page'; } // Grid 960px ----------------------------------------- if (mfn_is_960()) { $classes[] = 'grid960'; } // Nice Scroll ---------------------------------------- if (mfn_opts_get('nice-scroll')) { $classes[] = 'nice-scroll-on'; } // Responsive ----------------------------------------- if (mfn_opts_get('no-hover')) { $classes[] = 'no-hover-' . mfn_opts_get('no-hover'); } if (mfn_opts_get('no-section-bg')) { $classes[] = 'no-section-bg-' . mfn_opts_get('no-section-bg'); } if (mfn_opts_get('responsive-top-bar')) { $classes[] = 'mobile-tb-' . mfn_opts_get('responsive-top-bar'); } $responsive_options = mfn_opts_get('responsive-options'); if (is_array($responsive_options) && isset($responsive_options['mobile-wide'])) { $classes[] = 'mobile-wide'; } // Button | Style ------------------------------------- if ($_GET && key_exists('mfn-btn', $_GET)) { $classes[] = 'button-' . $_GET['mfn-btn']; // demo } elseif (mfn_opts_get('button-style')) { $classes[] = 'button-' . mfn_opts_get('button-style'); } // Image Frame | Style -------------------------------- if ($_GET && key_exists('mfn-if', $_GET)) { $classes[] = 'if-' . $_GET['mfn-if']; // demo } elseif (mfn_opts_get('image-frame-style')) { $classes[] = 'if-' . mfn_opts_get('image-frame-style'); } // Content Padding ------------------------------------ if (mfn_opts_get('content-remove-padding')) { $classes[] = 'no-content-padding'; } elseif (get_post_meta(mfn_ID(), 'mfn-post-remove-padding', true)) { $classes[] = 'no-content-padding'; } // RTL | demo only ------------------------------------ if ($_GET && key_exists('mfn-rtl', $_GET)) { $classes[] = 'rtl'; } // Love ----------------------------------------------- if (!mfn_opts_get('love')) { $classes[] = 'hide-love'; } // Table Hover ---------------------------------------- if (mfn_opts_get('table-hover-disable')) { $classes[] = 'no-table-hover'; } // Header ============================================= $header_options = mfn_opts_get('header-fw') ? mfn_opts_get('header-fw') : false; // Header | Layout -------------------------- $classes[] = mfn_header_style(); // Header | Full Width ---------------------- if ($_GET && key_exists('mfn-hfw', $_GET)) { $classes[] = 'header-fw'; // demo } elseif (isset($header_options['full-width'])) { $classes[] = 'header-fw'; } // Header | Boxed --------------------------- if (is_array($header_options) && isset($header_options['header-boxed'])) { $classes[] = 'header-boxed'; } // Header | Minimalist ---------------------- if ($_GET && key_exists('mfn-min', $_GET)) { $classes[] = 'minimalist-header'; // demo } elseif ($layoutID) { if (get_post_meta($layoutID, 'mfn-post-minimalist-header', true)) { $classes[] = 'minimalist-header'; } } elseif (mfn_opts_get('minimalist-header')) { $classes[] = 'minimalist-header'; } // Header | Sticky -------------------------- if (mfn_opts_get('sticky-header') && mfn_header_style(true) != 'header-creative') { $classes[] = 'sticky-header'; } // Header Sticky Style ---------------------- if ($_GET && key_exists('mfn-ss', $_GET)) { $classes[] = 'sticky-' . $_GET['mfn-ss']; // demo } elseif ($layoutID) { $classes[] = 'sticky-' . get_post_meta($layoutID, 'mfn-post-sticky-header-style', true); } else { $classes[] = 'sticky-' . mfn_opts_get('sticky-header-style', 'white'); } // Action Bar ------------------------------- if (mfn_opts_get('action-bar')) { $classes[] = 'ab-show'; } else { $classes[] = 'ab-hide'; } // Subheader | Transparent ------------------ $skin = mfn_opts_get('skin', 'custom'); if ($_GET && key_exists('mfn-subtr', $_GET)) { $classes[] = 'subheader-transparent'; // demo } elseif (!in_array($skin, array('custom', 'one'))) { if (mfn_opts_get('subheader-transparent') != 100) { $classes[] = 'subheader-transparent'; } } // Subheader | Style ------------------------ if ($_GET && key_exists('mfn-sh', $_GET)) { $classes[] = 'subheader-' . $_GET['mfn-sh']; // demo } else { $classes[] = 'subheader-' . mfn_opts_get('subheader-style', 'title-left'); } // Menu | Style ----------------------------- if ($_GET && key_exists('mfn-m', $_GET)) { $classes[] = 'menu-' . $_GET['mfn-m']; // demo } elseif (mfn_opts_get('menu-style')) { $classes[] = 'menu-' . mfn_opts_get('menu-style'); } // Menu | Options --------------------------- $menu_options = mfn_opts_get('menu-options'); if (is_array($menu_options) && isset($menu_options['align-right'])) { $classes[] = 'menuo-right'; } if (is_array($menu_options) && isset($menu_options['menu-arrows'])) { $classes[] = 'menuo-arrows'; } if (is_array($menu_options) && isset($menu_options['hide-borders'])) { $classes[] = 'menuo-no-borders'; } if (is_array($menu_options) && isset($menu_options['last'])) { $classes[] = 'menuo-last'; } // Footer ============================================= // Footer | Style --------------------------- if ($_GET && key_exists('mfn-ftr', $_GET)) { $classes[] = 'footer-' . $_GET['mfn-ftr']; // demo } elseif (mfn_opts_get('footer-style')) { $classes[] = 'footer-' . mfn_opts_get('footer-style'); } // Footer | Copy & Social ------------------- if (mfn_opts_get('footer-hide') == 'center') { $classes[] = 'footer-copy-center'; } return $classes; }
function mfn_body_classes($classes) { // custom layout ------------------ $layoutID = get_post_meta(mfn_ID(), 'mfn-post-custom-layout', true); // template-slider ---------------- if (mfn_slider()) { $classes[] = 'template-slider'; } // sidebar classes ---------------- $classes[] = mfn_sidebar_classes(); // skin --------------------------- if ($_GET && key_exists('mfn-c', $_GET)) { $classes[] = 'color-' . $_GET['mfn-c']; // demo } elseif ($layoutID) { $classes[] = 'color-' . get_post_meta($layoutID, 'mfn-post-skin', true); } else { $classes[] = 'color-' . mfn_opts_get('skin', 'custom'); } // theme layout ------------------- if ($_GET && key_exists('mfn-box', $_GET)) { $classes[] = 'layout-boxed'; // demo } elseif ($layoutID) { $classes[] = 'layout-' . get_post_meta($layoutID, 'mfn-post-layout', true); } else { $classes[] = 'layout-' . mfn_opts_get('layout', 'full-width'); } // header layout ------------------ $classes[] = mfn_header_style(); // minimalist header -------------- if ($_GET && key_exists('mfn-min', $_GET)) { $classes[] = 'minimalist-header'; // demo } elseif ($layoutID) { if (get_post_meta($layoutID, 'mfn-post-minimalist-header', true)) { $classes[] = 'minimalist-header'; } } elseif (mfn_opts_get('minimalist-header')) { $classes[] = 'minimalist-header'; } // subheader-transparent ---------- if ($_GET && key_exists('mfn-subtr', $_GET)) { $classes[] = 'subheader-transparent'; // demo } elseif (mfn_opts_get('subheader-transparent')) { $classes[] = 'subheader-transparent'; } // subheader-transparent ---------- if ($_GET && key_exists('mfn-mr', $_GET)) { $classes[] = 'header-menu-right'; // demo } elseif (mfn_opts_get('header-menu-right')) { $classes[] = 'header-menu-right'; } // menu-style --------------------- if ($_GET && key_exists('mfn-m', $_GET)) { $classes[] = 'menu-' . $_GET['mfn-m']; // demo } elseif (mfn_opts_get('menu-style')) { $classes[] = 'menu-' . mfn_opts_get('menu-style'); } // grid 960px --------------------- if (mfn_is_960()) { $classes[] = 'grid960'; } // sticky header ------------------ if (mfn_opts_get('sticky-header') && mfn_header_style(true) != 'header-creative') { $classes[] = 'sticky-header'; } // nice scroll -------------------- if (mfn_opts_get('nice-scroll')) { $classes[] = 'nice-scroll-on'; } // page title --------------------- if ($_GET && key_exists('mfn-hide', $_GET)) { $classes[] = 'hide-title-area'; // demo } elseif (get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) { $classes[] = 'hide-title-area'; } // rtl | demo --------------------- if ($_GET && key_exists('mfn-rtl', $_GET)) { $classes[] = 'rtl'; } return $classes; }
/** * The Page Sidebar containing the widget area. * * @package Betheme * @author Muffin group * @link http://muffingroup.com */ $portfolio_page_id = mfn_opts_get('portfolio-page'); $sidebars = mfn_opts_get('sidebars'); $sidebar = get_post_meta($portfolio_page_id, 'mfn-post-sidebar', true); $sidebar = $sidebars[$sidebar]; ?> <?php if (mfn_sidebar_classes()) { ?> <div class="four columns"> <div class="widget-area clearfix <?php mfn_opts_show('sidebar-lines'); ?> "> <?php if (!dynamic_sidebar($sidebar)) { mfn_nosidebar(); } ?> </div> </div> <?php }
function mfn_body_classes($classes) { // template-slider if (!is_404() && get_post_type() == 'page' && get_post_meta(get_the_ID(), 'mfn-post-slider', true)) { $classes[] = 'template-slider'; } // sidebar classes $classes[] = mfn_sidebar_classes(); // layout $classes[] = 'layout-' . mfn_opts_get('layout', 'boxed'); $classes[] = 'footer-' . mfn_opts_get('footer-layout', 'separate'); return $classes; }
function mfn_builder_print($post_id, $content_field = false) { // Sizes for Items $classes = array('1/6' => 'one-sixth', '1/5' => 'one-fifth', '1/4' => 'one-fourth', '1/3' => 'one-third', '1/2' => 'one-second', '2/3' => 'two-third', '3/4' => 'three-fourth', '1/1' => 'one'); // Sidebars list $sidebars = mfn_opts_get('sidebars'); // GET Sections & Items $mfn_items = get_post_meta($post_id, 'mfn-page-items', true); $mfn_tmp_fn = 'base' . '64_decode'; $mfn_items = unserialize(call_user_func($mfn_tmp_fn, $mfn_items)); // print_r($mfn_items); // WordPress Editor Content ------------------------------------- if (mfn_opts_get('display-order') == 1) { mfn_builder_print_content($post_id, $content_field); } // Content Builder if (post_password_required()) { // prevents duplication of the password form if (get_post_meta($post_id, 'mfn-post-hide-content', true)) { echo '<div class="section the_content">'; echo '<div class="section_wrapper">'; echo '<div class="the_content_wrapper">'; echo get_the_password_form(); echo '</div>'; echo '</div>'; echo '</div>'; } } elseif (is_array($mfn_items)) { // Sections foreach ($mfn_items as $section) { // print_r($section['attr']); // section attributes ----------------------------------- // Sidebar for section ------------- if (!mfn_sidebar_classes() && ($section['attr']['layout'] == 'right-sidebar' || $section['attr']['layout'] == 'left-sidebar')) { $section_sidebar = $section['attr']['layout']; } else { $section_sidebar = false; } // classes ------------------------ $section_class = array(); $section_class[] = $section_sidebar; $section_class[] = $section['attr']['style']; $section_class[] = $section['attr']['class']; if (key_exists('visibility', $section['attr'])) { $section_class[] = $section['attr']['visibility']; } if (key_exists('bg_video_mp4', $section['attr']) && $section['attr']['bg_video_mp4']) { $section_class[] = 'has-video'; } if (key_exists('navigation', $section['attr']) && $section['attr']['navigation']) { $section_class[] = 'has-navi'; } if (key_exists('column_margin', $section['attr']) && $section['attr']['column_margin']) { $section_class[] = 'column-margin-' . $section['attr']['column_margin']; } $section_class = implode(' ', $section_class); // styles ------------------------- $section_style = ''; $section_style[] = 'padding-top:' . intval($section['attr']['padding_top']) . 'px'; $section_style[] = 'padding-bottom:' . intval($section['attr']['padding_bottom']) . 'px'; $section_style[] = 'background-color:' . $section['attr']['bg_color']; // background image attributes if ($section['attr']['bg_image']) { $section_style[] = 'background-image:url(' . $section['attr']['bg_image'] . ')'; $section_bg_attr = explode(';', $section['attr']['bg_position']); $section_style[] = 'background-repeat:' . $section_bg_attr[0]; $section_style[] = 'background-position:' . $section_bg_attr[1]; $section_style[] = 'background-attachment:' . $section_bg_attr[2]; $section_style[] = 'background-size:' . $section_bg_attr[3]; $section_style[] = '-webkit-background-size:' . $section_bg_attr[3]; } $section_style = implode('; ', $section_style); // parallax ------------------------- $parallax = false; if ($section['attr']['bg_image'] && $section_bg_attr[2] == 'fixed') { if (!key_exists(4, $section_bg_attr) || $section_bg_attr[4] != 'still') { $parallax = 'data-stellar-background-ratio="0.5"'; } } // IDs ------------------------------ if (key_exists('section_id', $section['attr']) && $section['attr']['section_id']) { $section_id = 'id="' . $section['attr']['section_id'] . '"'; } else { $section_id = false; } // print ------------------------------------------------ echo '<div class="section ' . $section_class . '" ' . $section_id . ' style="' . $section_style . '" ' . $parallax . '>'; // 100% // Video ------------------------ if (key_exists('bg_video_mp4', $section['attr']) && ($mp4 = $section['attr']['bg_video_mp4'])) { echo '<div class="section_video">'; echo '<div class="mask"></div>'; $poster = $section['attr']['bg_image']; echo '<video poster="' . $poster . '" controls="controls" muted="muted" preload="auto" loop="true" autoplay="true">'; echo '<source type="video/mp4" src="' . $mp4 . '" />'; if (key_exists('bg_video_ogv', $section['attr']) && ($ogv = $section['attr']['bg_video_ogv'])) { echo '<source type="video/ogg" src="' . $ogv . '" />'; } echo '<object width="1900" height="1060" type="application/x-shockwave-flash" data="' . THEME_URI . '/js/flashmediaelement.swf">'; echo '<param name="movie" value="' . THEME_URI . '/js/flashmediaelement.swf" />'; echo '<param name="flashvars" value="controls=true&file=' . $mp4 . '" />'; echo '<img src="' . $poster . '" title="No video playback capabilities" />'; echo '</object>'; echo '</video>'; echo '</div>'; } // Separator ------------------------ if (key_exists('divider', $section['attr']) && ($divider = $section['attr']['divider'])) { echo '<div class="section-divider ' . $divider . '"></div>'; } // Navigation ------------------------ if (key_exists('navigation', $section['attr']) && ($divider = $section['attr']['navigation'])) { echo '<div class="section-nav prev"><i class="icon-up-open"></i></div>'; echo '<div class="section-nav next"><i class="icon-down-open"></i></div>'; } echo '<div class="section_wrapper clearfix">'; // WIDTH + margin: 0 auto // Items ------------------------ echo '<div class="items_group clearfix">'; // 100% || WIDTH (sidebar) if (is_array($section['items'])) { foreach ($section['items'] as $item) { if (function_exists('mfn_print_' . $item['type'])) { $class = $classes[$item['size']]; // Item | Size $class .= ' column_' . $item['type']; // Item | Type if (isset($item['fields']['classes'])) { $class .= ' ' . $item['fields']['classes']; // Item | Custom Classes } echo '<div class="column ' . $class . '">'; call_user_func('mfn_print_' . $item['type'], $item); echo '</div>'; } } } echo '</div>'; // Sidebar for section ----------- if ($section_sidebar) { echo '<div class="four columns section_sidebar">'; echo '<div class="widget-area clearfix">'; dynamic_sidebar($sidebars[$section['attr']['sidebar']]); echo '</div>'; echo '</div>'; } echo '</div>'; echo '</div>'; } } // WordPress Editor Content ------------------------------------- if (mfn_opts_get('display-order') == 0) { mfn_builder_print_content($post_id, $content_field); } }
} // demo // sidebar 2 -------------------------------------------------------- $sidebar2 = get_post_meta($posts_page_id, 'mfn-post-sidebar2', true); if ($sidebar2 || $sidebar2 === '0') { $sidebar2 = $sidebars[$sidebar2]; } if ($_GET && key_exists('mfn-s2', $_GET)) { $sidebar2 = $_GET['mfn-s2']; } // demo // echo ------------------------------------------------------------- if (mfn_sidebar_classes()) { echo '<div class="sidebar sidebar-1 four columns">'; echo '<div class="widget-area clearfix ' . mfn_opts_get('sidebar-lines') . '">'; if (!dynamic_sidebar($sidebar)) { mfn_nosidebar(); } echo '</div>'; echo '</div>'; // both sidebars if (mfn_sidebar_classes(true)) { echo '<div class="sidebar sidebar-2 four columns">'; echo '<div class="widget-area clearfix ' . mfn_opts_get('sidebar-lines') . '">'; if (!dynamic_sidebar($sidebar2)) { mfn_nosidebar(); } echo '</div>'; echo '</div>'; } }
<?php /** * The search template file. * * @package Bretheon * @author Muffin group * @link http://muffingroup.com */ get_header(); $sidebar = mfn_sidebar_classes(get_option('page_for_posts')); ?> <!-- #Content --> <div id="Content"> <div class="container"> <!-- .content --> <div class="content" style="width:100% !important;"> <div class="the_content the_content_wrapper"> <?php while (have_posts()) { the_post(); ?> <div class="post clearfix"> <div class="desc no_meta no-post-thumbnail"> <h3><?php the_title(); ?> </h3>
function mfn_body_classes($classes) { global $post; // template-slider if (!is_404() && get_post_type() == 'page' && get_post_meta(get_the_ID(), 'mfn-post-slider', true)) { $classes[] = 'template-slider'; } // sidebar classes $classes[] = mfn_sidebar_classes(); // sticky header if (mfn_opts_get('header-sticky')) { $classes[] = 'sticky-header'; } // layout $classes[] = 'layout-' . mfn_opts_get('layout', 'boxed'); return $classes; }