Exemplo n.º 1
0
function xt_smart_sidebar()
{
    global $post;
    $post_settings = xt_get_single_settings('post');
    extract($post_settings);
    $is_endless_template = xt_is_endless_template();
    $enabled = (bool) xt_option('single_post_smart_sidebar');
    if (!$enabled || $is_endless_template) {
        return false;
    }
    $position = xt_option('single_post_smart_sidebar_position');
    $items = xt_option('single_post_smart_sidebar_items');
    if (empty($items["enabled"])) {
        return false;
    }
    echo '<div class="smart-sidebar">';
    foreach ($items["enabled"] as $key => $item) {
        echo '<div class="smart-sidebar-item">';
        if (strpos($key, 'divider') !== false) {
            echo '<div class="smart-sidebar-divider"></div>';
        } else {
            if ($key == 'social-share') {
                echo xt_socialshare();
            } else {
                if ($key == 'post-date' && $show_post_date) {
                    xt_post_date();
                } else {
                    if ($key == 'post-author' && $show_post_author) {
                        xt_post_author();
                    } else {
                        if ($key == 'post-stats' && $show_post_stats) {
                            echo '<div class="meta">';
                            xt_post_stats(true, array('mini'));
                            echo '</div>';
                        } else {
                            if ($key == 'widget-zone' && $show_post_author) {
                                $widget_zone = xt_option('single_post_smart_sidebar_widget_zone');
                                $widget_zone_active = is_active_sidebar($widget_zone);
                                if ($widget_zone_active) {
                                    xt_show_dynamic_sidebar($widget_zone, 'single-post.php', "smart-sidebar", "smart-{$datemodified_enabled} position-" . $position);
                                }
                            }
                        }
                    }
                }
            }
        }
        echo '</div>';
    }
    echo '</div>';
}
Exemplo n.º 2
0
        xt_post_featured_media();
        ?>
							<?php 
    }
    ?>

							<?php 
    xt_post_content();
    ?>
							
							<div class="<?php 
    echo xt_smart_sidebar_has('social-share') ? 'show-for-small' : '';
    ?>
">
							<?php 
    $xtss_box = xt_socialshare();
    if ($xtss_box) {
        echo $xtss_box;
    }
    ?>
							</div>
						
		
							<?php 
    $pagination_position = xt_option('paginate_position');
    wp_link_pages(array('before' => '<nav class="navigation paging-navigation link_pages ' . $pagination_position . '" role="navigation"><div class="pagination loop-pagination">', 'after' => '</div></div>', 'link_before' => '<span>', 'link_after' => '</span>', 'previouspagelink' => __('<span class="fa fa-angle-left"></span>', XT_TEXT_DOMAIN), 'nextpagelink' => __('<span class="fa fa-angle-right"></span>', XT_TEXT_DOMAIN)));
    ?>
		
						<?php 
}
?>