Blogs
[php]
$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
$args = array(‘paged’ => $paged, ‘post_type’ => ‘cpt_news’);
query_posts($args);

while ( have_posts() ) : the_post();
$isdxn=get_the_id();
if($isdxn!=2438):
echo “[tr][td class=’posted_on’]”;
echo the_time(‘M j, Y’);
echo “[/td][td class=’title’]<a href='”;
echo the_permalink();
echo “‘>”;
echo the_title();
echo “[/a]”;
echo “[/td][td class=’excerpt’]”;
echo strip_tags(trim(get_the_excerpt()));
echo “[/td][/tr]”;
endif;
endwhile;

// Reset Query
wp_reset_query();
[/php]

Date Posted Title Excerpt

[php] if ( $wp_query->max_num_pages > 1 ) :
$nextposts = get_next_posts_link( __( ‘← Older posts’, ‘faded’ ) );
$prevposts = get_previous_posts_link( __( ‘Newer posts →’, ‘faded’ ) );
$nextposts = split(‘”‘,$nextposts);
$prevposts = split(‘”‘,$prevposts);

echo “[div class=”pagination”]”;
if ($prevposts[1]) {
echo “< a href='”;
echo $prevposts[1];
echo “‘ class=”prev”]Prev[/a]”;
}
if ($nextposts[1]) {
echo “< a href='”;
echo $nextposts[1];
echo “‘ class=”next”]Next[/a]”;
}
echo “[/div]”;

endif; [/php]

Leave a Comment

*