/ Published in: PHP

Expand |
Embed | Plain Text
<?php // Our include require_once('../../../wp-load.php'); // Our variables $count = 0; global $query_string; $args = wp_parse_args($query_string); if($catSlug=='all'){ 'post_type' => 'post', 'paged' => $page, 'posts_per_page' => $numPosts, 'post_status' => 'publish', ); }else{ 'category_name' => $catSlug, 'post_type' => 'post', 'paged' => $page, 'posts_per_page' => $numPosts, 'post_status' => 'publish', ); } ?> <?php $wp_query = new WP_Query( $args ); ?> <?php $totalposts = $wp_query->post_count; while ($wp_query->have_posts()) : $wp_query->the_post(); $count++; ?> <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting"> <header class="article-header"> <h1 class="news-title"><?php the_title(); ?></h1> <?php $postid = get_the_ID(); ?> <p class="byline vcard"> </p> </header> <!-- end article header --> <section class="entry-content clearfix" itemprop="articleBody"> <?php the_content(); ?> </section> <!-- end article section --> </article> <!-- end article --> <?php endwhile; wp_reset_query(); ?>
You need to login to post a comment.