Example #1
0
<?php

global $post, $sidebar_below_title, $is_endless_template;
$post_format = get_post_format();
$is_endless_template = xt_is_endless_template();
$sidebar_below_title = xt_is_sidebar_below_title($post->ID);
//Featured image settings
list($single_post_featured_image, $single_post_featured_image_position) = xt_get_featured_image_settings($post->ID);
$behind_title_fw = $single_post_featured_image_position == 'behind-title-fullwidth';
if ($behind_title_fw && !$sidebar_below_title) {
    $sidebar_below_title = true;
}
// Post settings
$post_settings = xt_get_single_settings('post');
extract($post_settings);
// Smart Sidebar
$smart_sidebar_position = xt_smart_sidebar_position();
$smart_sidebar_enabled = $smart_sidebar_position !== false;
?>

			<!--Single Article -->	
				
			<article id="post-<?php 
the_ID();
?>
" data-postid="<?php 
echo esc_attr($post->ID);
?>
" data-guid="<?php 
echo esc_attr(get_the_guid($post->ID));
?>
Example #2
0
function xt_oembed_extra_params($video_embed)
{
    $extra_params = 'src="$1&rel=0';
    $is_endless_articles = xt_is_endless_template();
    if (!$is_endless_articles) {
        $autoplay = (bool) xt_option('single_video_player_autoplay', null, 1);
        if ($autoplay) {
            $extra_params .= '&autoplay=1';
        }
    }
    $extra_params .= '"';
    $video_embed = preg_replace('/src\\=\\"(.+?)\\"/i', $extra_params, $video_embed);
    return $video_embed;
}
Example #3
0
<?php

$show_nav_links = false;
if (is_singular('post') && !xt_is_endless_template()) {
    $show_nav_links = (int) xt_option('show_post_nav_links');
}
if (!empty($show_nav_links)) {
    $class = $show_nav_links == 2 ? 'show-on-scroll' : 'show-always';
    xt_post_nav($class);
}