function glades_custom_slider_params() { // Get Theme Options from Database $theme_options = glades_theme_options(); // Set Parameters array $params = array(); // Define Slider Animation if (isset($theme_options['slider_animation'])) { $params['animation'] = esc_attr($theme_options['slider_animation']); } // Passing Parameters to Javascript wp_localize_script('glades-post-slider', 'glades_slider_params', $params); }
function glades_google_fonts_url() { $fonts_url = ''; // Get Theme Options from Database $theme_options = glades_theme_options(); // Only embed Google Fonts if not deactivated if (!(isset($theme_options['deactivate_google_fonts']) and $theme_options['deactivate_google_fonts'] == true)) { // Define Default Fonts $font_families = array('PT Sans:700,400', 'Contrail One'); // Set Google Font Query Args $query_args = array('family' => urlencode(implode('|', $font_families)), 'subset' => urlencode('latin,latin-ext')); // Create Fonts URL $fonts_url = add_query_arg($query_args, '//fonts.googleapis.com/css'); } return apply_filters('glades_google_fonts_url', $fonts_url); }
function glades_css_layout() { // Get Theme Options from Database $theme_options = glades_theme_options(); // Change Site Layout to boxed if activated if (isset($theme_options['layout']) and $theme_options['layout'] == 'boxed') { echo '<style type="text/css"> @media only screen and (min-width: 60em) { #wrapper { max-width: 1325px; width: 94%; margin: 0 auto; } .container { max-width: 100%; width: auto; margin: 0 2em; } } </style>'; } // Switch Sidebar to left if (isset($theme_options['sidebar']) and $theme_options['sidebar'] == 'left-sidebar') { echo '<style type="text/css"> @media only screen and (min-width: 60em) { #content { float: right; padding-right: 0; padding-left: 2em; } #sidebar { float: left; } } </style>'; } }
function glades_display_footer_text() { // Get Theme Options from Database $theme_options = glades_theme_options(); if (isset($theme_options['footer_text']) and $theme_options['footer_text'] != '') { echo do_shortcode(wp_kses_post($theme_options['footer_text'])); } }
<?php get_header(); ?> <?php // Get Theme Options from Database $theme_options = glades_theme_options(); ?> <div id="wrap" class="container clearfix"> <section id="content" class="primary" role="main"> <header class="page-header"> <?php the_archive_title('<h2 class="archive-title">', '</h2>'); ?> </header> <?php if (have_posts()) { while (have_posts()) { the_post(); get_template_part('content', $theme_options['posts_length']); } glades_display_pagination(); } ?> </section>