Example #1
0
function ts_blog_shortcode($atts = null, $content = null)
{
    $layout = isset($atts['layout']) ? $atts['layout'] : '';
    $atts = isset($atts) && is_array($atts) ? $atts : array();
    $atts['called_via'] = 'shortcode';
    if (function_exists('ts_blog')) {
        ob_start();
        ts_blog($layout, $atts);
        $output = ob_get_contents();
        $output = preg_replace("/(^[\r\n]*|[\r\n]+)[\\s\t]*[\r\n]+/", "\n", $output);
        ob_end_clean();
    }
    return $output;
}
Example #2
0
            <div id="main-container-wrap" class="<?php 
echo esc_attr(ts_main_container_wrap_class('page'));
?>
">
                <div id="main-container" class="container clearfix">            
                    <div id="main" class="<?php 
echo esc_attr(ts_main_div_class());
?>
 clearfix">
                        <div class="entry single-entry clearfix">
                            <div class="post">
                                <?php 
/* 
 * Run the loop to output the posts.
 */
$ts_loop = isset($smof_data['archive_layout']) ? $smof_data['archive_layout'] : '';
ts_blog($ts_loop, array('default_query' => true));
?>
                            </div>
                        </div>
                    </div>

    <?php 
ts_get_sidebar();
?>

                </div><!-- #main-container -->
            </div><!-- #main-container-wrap -->
            
<?php 
get_footer();
Example #3
0
        }
        ?>
                                    
                                        <?php 
        $show_related_option = ts_option_vs_default('show_related_blog_posts', 1) == 1 ? 'yes' : 'no';
        $show_related = ts_postmeta_vs_default($post->ID, '_p_related_posts', $show_related_option);
        if ($show_related == '1' || $show_related == 'yes') {
            ?>
                                        <div class="ts-related-posts-on-single ts-post-section-inner">
                                            <h5 class="smaller uppercase"><?php 
            echo ts_option_vs_default('related_blog_posts_title_text', 'Related Posts');
            ?>
</h4>
                                            <?php 
            $args = array('include' => 'related', 'limit' => 3, 'show_pagination' => 'no', 'media_width' => 480, 'media_height' => 360, 'title_size' => 4, 'allow_videos' => 0, 'allow_galleries' => 0);
            echo ts_blog('3columns', $args);
            ?>
                                        </div>
                                        <?php 
        }
        ?>
                                        
                                    </div>
                                    
                                    <div id="ts-comments-wrap-wrap" class="clearfix <?php 
        echo esc_attr(ts_single_comments_wrap_wrap_class());
        ?>
">
                                        <div id="ts-comments-wrap" class="<?php 
        echo esc_attr(ts_single_comments_wrap_class());
        ?>
Example #4
0
echo esc_attr(ts_main_div_class());
?>
 clearfix">
                        <div class="entry single-entry clearfix">
                            <div class="post">
                                <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        the_content();
    }
}
$ts_loop = isset($smof_data['blog_layout']) ? $smof_data['blog_layout'] : '';
$ts_loop = isset($_GET['layout']) ? $_GET['layout'] : $ts_loop;
$atts = array('infinite_scroll' => $ts_infinite_scroll, 'layout' => $ts_loop, 'pid' => $ts_page_id);
$atts = array('original_atts' => $atts);
ts_blog($atts, $ts_loop);
?>
                            </div>
                        </div>
                    </div>

    <?php 
ts_get_sidebar();
?>

                </div><!-- #main-container -->
            </div><!-- #main-container-wrap -->
            
<?php 
get_footer();
Example #5
0
?>
 <span class="ts-highlight highlight"><?php 
echo esc_attr($_GET['s']);
?>
</span></p>
                                </div>
                                <?php 
/* 
 * Run the loop to output the posts.
 */
if (get_query_var('post_type') == 'portfolio') {
    $ts_loop = isset($smof_data['portfolio_layout']) ? $smof_data['portfolio_layout'] : '';
    ts_portfolio($ts_loop, array('default_query' => true, 'is_search' => true));
} else {
    $ts_loop = isset($smof_data['search_layout']) ? $smof_data['search_layout'] : '';
    ts_blog($ts_loop, array('default_query' => true, 'is_search' => true));
}
?>
                            </div>
                        </div>                        
                    </div>

<?php 
ts_get_sidebar();
?>

                </div><!-- #main-container -->
            </div><!-- #main-container-wrap -->
            
<?php 
get_footer();
Example #6
0
function ts_load_infinite_blog()
{
    $post = get_post($_POST['pid']);
    if (is_object($post) && isset($post->ID)) {
        $ts_show_sidebar_option = ts_option_vs_default('show_page_sidebar', 1) < 1 ? 'no' : 'yes';
        $ts_show_sidebar = ts_postmeta_vs_default($post->ID, '_page_sidebar', $ts_show_sidebar_option);
        $post_data = $_POST;
        $post_data['via_ajax'] = 1;
        echo ts_blog($post_data, $post_data['layout']);
    }
    exit;
}
Example #7
0
echo esc_attr(ts_main_container_wrap_class('page'));
?>
">
                <div id="main-container" class="container clearfix">            
                    <div id="main" class="<?php 
echo esc_attr(ts_main_div_class());
?>
 clearfix">
                        <div class="entry single-entry clearfix">
                            <div class="post">
                                <?php 
/* 
 * Run the loop to output the posts.
 */
$ts_loop = isset($smof_data['archive_layout']) ? $smof_data['archive_layout'] : '';
$atts = array('infinite_scroll' => $ts_infinite_scroll, 'layout' => $ts_loop, 'default_query' => true, 'pid' => $ts_page_id);
ts_blog($ts_loop, $atts);
?>
                            </div>
                        </div>
                    </div>

    <?php 
ts_get_sidebar();
?>

                </div><!-- #main-container -->
            </div><!-- #main-container-wrap -->
            
<?php 
get_footer();
Example #8
0
 //echo do_shortcode('[blog author='.$current_user->ID.' layout="classic" limit="10" infinite_scroll="yes_button" infinite_scroll_limit="0" infinite_scroll_button_text="Load more posts" cat="" include="" exclude="" exclude_previous_posts="yes" exclude_these_later="yes" excerpt_length="" title_size="" text_align="" show_pagination="no" show_category="yes" show_media="yes" show_excerpt="yes" show_meta="yes" show_read_more="yes" image_orientation="" allow_videos="yes" allow_galleries="yes" ignore_sticky_posts="0"][/blog]');
 //$ts_loop = (isset($smof_data['blog_layout'])) ? $smof_data['blog_layout'] : '';
 $atts_author = array('author' => $current_user->ID, 'limit' => '10', 'infinite_scroll' => 'yes_button', 'infinite_scroll_limit' => '0');
 ts_blog('classic', $atts_author);
 ?>
     		</div>
     	</div>
     	<div class="col-md-6">
     		<h2>
     			Jrrnys I like
     		</h2>
             <div class="posts liked-posts">
                 <?php 
 //echo do_shortcode('[blog author='.$current_user->ID.' layout="classic" limit="10" infinite_scroll="yes_button" infinite_scroll_limit="0" infinite_scroll_button_text="Load more posts" cat="" include="" exclude="" exclude_previous_posts="yes" exclude_these_later="yes" excerpt_length="" title_size="" text_align="" show_pagination="no" show_category="yes" show_media="yes" show_excerpt="yes" show_meta="yes" show_read_more="yes" image_orientation="" allow_videos="yes" allow_galleries="yes" ignore_sticky_posts="0"][/blog]');
 $atts_liked = array('limit' => '10', 'infinite_scroll' => 'yes_button');
 ts_blog('classic', $atts_liked);
 // ts_blog('classic', array(
 //     'infinite_scroll' => $ts_infinite_scroll,
 //     'layout' => $ts_loop,
 //     'meta_query' => array(
 //         array(
 //             'key' => '_post_likes',
 //             //'value' => $current_user->user_login,
 //             'compare' => 'IN'
 //         )
 //     ),
 // ));
 ?>
             </div>
     	</div>
     </div>