Title: Adding Featured Post Section
Last modified: August 19, 2016

---

# Adding Featured Post Section

 *  [johnibanez](https://wordpress.org/support/users/johnibanez/)
 * (@johnibanez)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/adding-featured-post-section/)
 * Hi, I need help on making a featured post section on my blog.
 * I want the top post on the index page to be a post on the featured section and
   the next post would be the normal recent posts.
 * Heres my Blog : [http://johnibanez.net](http://johnibanez.net)
 * Heres the code for my front page if it will help:
 *     ```
       <?php get_header(); ?>
   
       	<div id="content">
   
       	<?php if (have_posts()) : ?>
   
       <a href="http://www.mozilla.com/firefox?from=sfx&uid=249473&t=306"><div class="firefox"></div></a>
   
       		<?php while (have_posts()) : the_post(); ?>
   
       			<div class="post" id="post-<?php the_ID(); ?>">
   
       				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
   
       				<div class="entry">
       					<?php the_content('Read the rest of this entry &raquo;'); ?>
       				</div>
   
       				<p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
       			</div>
   
       <!-- nuffnang -->
       <script type="text/javascript">
       nuffnang_bid = "66820df94e5924dd2d1a4ed70cbd04b0";
       </script>
       <script type="text/javascript" src="http://synad2.nuffnang.com.ph/j.js"></script>
       <!-- nuffnang-->
   
       		<?php endwhile; ?>
   
       		<div class="navigation">
       			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
       			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
       		</div>
   
       	<?php else : ?>
   
       		<h2>Not Found</h2>
       		<p>Sorry, but you are looking for something that isn't here.</p>
       		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
   
       	<?php endif; ?>
   
       <script type="text/javascript"><!--
       google_ad_client = "pub-9617820754242436";
       /* Line AD */
       google_ad_slot = "9484255509";
       google_ad_width = 430;
       google_ad_height = 15;
       //-->
       </script>
       <script type="text/javascript"
       src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
       </script>
   
       	</div>
   
       <?php get_sidebar(); ?>
   
       <?php get_footer(); ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/adding-featured-post-section/#post-978887)
 * Not too sure how you are designating ‘featured’ so this example assumes featured
   is a category.
 *     ```
       <?php
       $posts=get_posts('cat=1&showposts=1');
       if ($posts) {
       foreach($posts as $post) {
       setup_postdata($post);
       ?>
       <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
       <?php }
       }
       ?>
       ```
   
 * Related:
    [http://www.daobydesign.com/blog/2007/07/modifying-wordpress-front-page/](http://www.daobydesign.com/blog/2007/07/modifying-wordpress-front-page/)

Viewing 1 replies (of 1 total)

The topic ‘Adding Featured Post Section’ is closed to new replies.

## Tags

 * [featured](https://wordpress.org/support/topic-tag/featured/)

 * 1 reply
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/adding-featured-post-section/#post-978887)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
