Beispiel #1
0
/**
 * Outputs a page header
 *
 * @return void
 **/
function oxy_page_header($id, $heading_overrides = array(), $section_overrides = array())
{
    $custom = get_post_custom($id);
    if (isset($custom[THEME_SHORT . '_show_header']) && $custom[THEME_SHORT . '_show_header'][0] === 'show') {
        // if we have no custom title then use get_the_title
        $title = empty($custom[THEME_SHORT . '_content'][0]) ? get_the_title($id) : $custom[THEME_SHORT . '_content'][0];
        // create heading using custom meta data
        $heading = oxy_call_shortcode_with_meta('oxy_section_heading', array('sub_header', 'header_type', 'section_swatch_override', 'heading_colour', 'sub_header_size', 'header_size', 'header_weight', 'header_align', 'header_condensed', 'header_underline', 'header_underline_size', 'header_fade_out', 'heading_type', 'extra_classes', 'margin_top', 'margin_bottom', 'scroll_animation', 'scroll_animation_delay'), $title, $custom, $heading_overrides);
        // create section using custom meta data
        echo oxy_call_shortcode_with_meta('oxy_shortcode_section', array('swatch', 'text_shadow', 'inner_shadow', 'width', 'class', 'id', 'overlay_colour', 'overlay_opacity', 'overlay_grid', 'background_video_mp4', 'background_video_webm', 'background_image', 'background_image_size', 'background_image_repeat', 'background_image_attachment', 'background_position_vertical', 'height', 'transparency', 'vertical_alignment'), $heading, $custom, $section_overrides);
    }
}
<?php

/**
 * Default page template
 *
 * @package Lambda
 * @subpackage Frontend
 * @since 0.1
 *
 * @copyright (c) 2015 Oxygenna.com
 * @license http://wiki.envato.com/support/legal-terms/licensing-terms/
 * @version 1.17.0
 */
get_header();
$options = get_option(THEME_SHORT . '-options');
$slideshow = get_query_var('term');
?>
<article><?php 
echo oxy_call_shortcode_with_meta('oxy_shortcode_slideshow', array('flexslider', 'ids', 'animation', 'direction', 'speed', 'duration', 'directionnav', 'itemwidth', 'showcontrols', 'controlsposition', 'controlsalign', 'controls_vertical', 'captions', 'captions_horizontal', 'autostart', 'tooltip', 'extra_classes', 'margin_top', 'margin_bottom', 'scroll_animation', 'scroll_animation_delay'), $slideshow, $options, array('flexslider' => $slideshow, 'margin_top' => 'no-top', 'margin_bottom' => 'no-bottom'));
?>
</article>
<?php 
get_footer();