Exemplo n.º 1
0
</span></h3>
			
				<div class="row category-description">
					<div class="col-xs-8">
						<?php 
echo category_description();
?>
					</div>
				</div>
	
				<div id="posts-wrapper">
			        <?php 
global $exclude_posts;
?>
    	        	<?php 
get_standard_posts(array('category' => $category_id));
?>
        		</div>
			    
			<div id="load-more" class="load-posts" data-target="#posts-wrapper" data-page="home" data-exclude="<?php 
echo json_encode($exclude_posts);
?>
" data-category="<?php 
echo $category_id;
?>
">
				Load More Posts
				<i class="fa fa-spinner fa-spin"></i>
			</div>

Exemplo n.º 2
0
function category_filter_posts()
{
    $terms = get_terms('category', array('parent' => 0, 'hide_empty' => 0));
    $i = 0;
    $class = 'active';
    echo '<ul class="category-picker">';
    foreach ($terms as $k => $term) {
        if ($term->slug == 'uncategorized') {
            unset($terms[$k]);
            continue;
        }
        if ($i > 0) {
            $class = '';
        }
        $i = 1;
        echo '<li data-id="' . $term->term_id . '" class="' . $class . '">' . $term->name . '</li>';
    }
    echo '</ul>';
    echo '<div class="category-post-wrapper">';
    $i = 0;
    $style = '';
    foreach ($terms as $term) {
        if ($i > 0) {
            $style = 'style="display:none;"';
        }
        $i = 1;
        echo '<div class="row post-wrapper standard-wrapper" ' . $style . ' data-section-id="' . $term->term_id . '">';
        get_standard_posts(array('category' => $term->term_id, 'blazy' => false, 'posts_per_page' => 6));
        echo '</div>';
    }
    echo '</div>';
}
		<div class="col-offset-center">

			<div class="single-content content">
				<?php 
        the_content();
        ?>
			</div>
			<div class="content-divider"></div>
			<div class="related-posts">
				<h2>Related Posts</h2>
				<?php 
        $tag_ids = '';
        $tags = get_the_tags();
        foreach ((array) $tags as $tag) {
            //	$tag_ids = $tag->name . ',';
        }
        $x = 'edm, avicii';
        get_standard_posts(array('tags' => $x));
        ?>
			</div>
			

		</div>
		<div style="clear:both;"></div>
	</section>
	
</div> <!-- close content -->

<?php 
    }
}
Exemplo n.º 4
0
function aj_load_posts()
{
    global $exclude_posts;
    $nonce = $_POST['postCommentNonce'];
    if (!wp_verify_nonce($nonce, 'myajax-post-comment-nonce')) {
        die('Busted!');
    }
    $exclude_posts = isset($_POST['exclude']) ? $_POST['exclude'] : array();
    $type = isset($_POST['type']) ? $_POST['type'] : '';
    $category = isset($_POST['category']) ? $_POST['category'] : 0;
    $clicks = isset($_POST['clicks']) ? $_POST['clicks'] : '';
    $page_type = isset($_POST['page_type']) ? $_POST['page_type'] : '';
    $search_str = isset($_POST['search_str']) ? $_POST['search_str'] : '';
    $author = isset($_POST['author']) ? $_POST['author'] : 0;
    ob_start();
    echo get_standard_posts(array('author' => $author, 'category' => $category, 's' => $search_str));
    $result = ob_get_contents();
    ob_end_clean();
    echo json_encode(array('results' => $result, 'exclude' => $exclude_posts));
    exit;
}
Exemplo n.º 5
0
	<div class="row">
		<div class="col-md-12">
			<?php 
get_ad('banner');
?>
			<?php 
global $exclude_posts;
?>
			
			<div id="posts-wrapper">
				<?php 
get_standard_posts(array('show_ads' => 1));
?>
    
				<?php 
get_standard_posts(array('show_ads' => 0));
?>
    
			</div>
			
			<div id="load-more" class="load-posts" data-target="#posts-wrapper" data-page="home" data-exclude="<?php 
echo json_encode($exclude_posts);
?>
" data-category="0">
				Load More Posts
				<i class="fa fa-spinner fa-spin"></i>
			</div>
        </div>
			<?php 
//get_sidebar();
?>
Exemplo n.º 6
0
<div class="container main authors">
	<div class="row">
		<div class="col-xs-12">
			
			
				<h3 class="section-title">You Searched: <span><?php 
echo $search_str;
?>
</span></h3>
			
				<div id="posts-wrapper" style="margin-top:10px;">
					<?php 
global $exclude_posts;
?>
	            	<?php 
get_standard_posts(array('s' => $search_str));
?>
    
				</div>           	

			<div id="load-more" class="load-posts" data-target="#posts-wrapper" data-page="home" data-exclude="<?php 
echo json_encode($exclude_posts);
?>
" data-category="0" data-search_str="<?php 
echo $search_str;
?>
">
				Load More Posts
				<i class="fa fa-spinner fa-spin"></i>
			</div>
Exemplo n.º 7
0
						<?php 
author_biography($author_id);
?>
					</div>
					<div class="col-xs-4">
					</div>
				</div>
			</div>
		
			<div id="posts-wrapper">
		
		        <?php 
global $exclude_posts;
?>
            	<?php 
get_standard_posts(array('author_id' => $author_id));
?>
               	
			</div>

			<div id="load-more" class="load-posts" data-target="#posts-wrapper" data-page="home" data-exclude="<?php 
echo json_encode($exclude_posts);
?>
" data-author="<?php 
echo $author_id;
?>
">
				Load More Posts
				<i class="fa fa-spinner fa-spin"></i>
			</div>