php - Combining wordpress admin page content with custom template? -


is there way combine content wordpress page's main textarea content in custom template?

in case have custom template displays posts single category, have section displays written in wordpress admin page area.

this how have custom template set display relevant posts:

<?php query_posts('category_name=baby-coupons'); ?>      <?php /* start loop */ ?>     <?php while ( have_posts() ) : the_post(); ?>                        <h2><a href="<?php the_permalink() ;?>"><?php the_title() ;?></a> <span class="post-date">- <?php the_time('f j, y'); ?></span></h2>      <div class="row">          <div class="one-third">              <?php              if ( has_post_thumbnail() ) {                the_post_thumbnail();             }              ?>          </div>          <div class="two-third last">              <?php the_excerpt() ;?>          </div>       </div><!--/row-->          <hr>          <?php endwhile; ?> 

above have wordpress pages admin area content display, user write textarea display on page, possible?

this i've come with:

<?php get_posts(); ?>  <?php while ( have_posts() ) : the_post(); ?>       <?php the_content() ;?> <?php endwhile; ?>  <?php query_posts('category_name=baby-coupons'); ?>                <?php /* start loop */ ?>     <?php while ( have_posts() ) : the_post(); ?>                        <h2><a href="<?php the_permalink() ;?>"><?php the_title() ;?></a> <span class="post-date">- <?php the_time('f j, y'); ?></span></h2>      <div class="row">          <div class="one-third">              <?php              if ( has_post_thumbnail() ) { // check if post has post thumbnail assigned it.               the_post_thumbnail();             }              ?>          </div>          <div class="two-third last">              <?php the_excerpt() ;?>          </div>       </div><!--/row-->          <hr>          <?php endwhile; ?> 

is acceptable? it's working i'm not sure how classy is!


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -