Does anyone know how to structure a WP template in the loop by:
Publishing the page content on top, immediate followed by certain category posts underneath the page content?
Seems like it should be straight forward. I have not been able to locate any help on it.
Thank you.
Here's what I pulled together so far:
<?php
/**
* Template Name: Page & Posts
*/
?>
<?php get_header(); ?>
<div id="page">
<div class="content">
<article class="article">
<div id="content_box">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('g post'); ?>>
<div class="single_page">
<?php if ($options['mts_breadcrumb'] == '1') { ?>
<div class="breadcrumb"><?php the_breadcrumb(); ?></div>
<?php } ?>
<header>
<h1 class="title"><?php the_title(); ?></h1>
</header>
<div class="post-content box mark-links">
<?php the_content(); ?>
</div>
</div>
</div>
<?php comments_template( '', true ); ?>
<?php endwhile; ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post excerpt">
<header>
<span class="thecomment">
<p><a href="<?php comments_link(); ?>"> <?php comments_number('0','1','%'); ?></a></p>
</span>
<h2 class="title">
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<?php if($options['mts_headline_meta'] == '1') { ?>
<div class="post-info">
<span class="thetime"><?php _e('Written on ',''); the_time('F j, Y'); ?></span>
<span class="theauthor"><?php _e('by ',''); the_author_posts_link(); ?></span>
<span class="thecategory"><?php _e(' in ',''); the_category(', ') ?></span>
</div>
<?php } ?>
</header>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" id="featured-thumbnail">
<?php if ( has_post_thumbnail() ) { ?>
<?php echo '<div class="featured-thumbnail">'; the_post_thumbnail('featured',array('title' => '')); echo '</div>'; ?>
<?php } ?>
</a>
<div class="post-content image-caption-format-1">
<?php echo excerpt(53);?>
</div>
<div class="readMore"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php _e('Read More',''); ?></a></div>
</div>
<?php endwhile; endif; ?>
<?php if ($options['mts_pagenavigation'] == '1') { ?>
<?php pagination($additional_loop->max_num_pages); ?>
<?php } else { ?>
<div class="pnavigation2">
<div class="nav-previous"><?php next_posts_link( __( '← '.'Older posts', '' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts'.' →', '' ) ); ?></div>
</div>
<?php } ?>
</div>
</article>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
get_posts
orWP_Query
with two loops.