Title: .php featured section help&#8230;
Last modified: August 19, 2016

---

# .php featured section help…

 *  Resolved [bespokeordie](https://wordpress.org/support/users/bespokeordie/)
 * (@bespokeordie)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/php-featured-section-help/)
 * Hello!! I am working on my arthemia based theme and currently am using the Featured
   Content Gallery Plugin for a featured section on my website: [http://www.bespokeordie.com](http://www.bespokeordie.com).
 * Instead I would like to show the last post published up there. Nothing complicated.
   I just want the Featured section to show what I just published in the same format
   as the rest of the body below the Category Navigation Bar.
 * I don’t want to exclude Headline or Featured Categories, I just want the first
   post to show up up top and the rest to show up where they are in the body of 
   the site.
 * Here is my index.php code:
 *     ```
       <?php get_header(); ?>
   
       	<?php if(!is_paged()) { ?>
       	<style type="text/css">
       <!--
       .style1 {
       	font-weight: bold;
       	font-size: medium;
       }
       -->
           </style>
   
       	<div id="top" class="clearfloat">
       	  <div id="headline">
       	  <div class="title">featured &amp;raquo</div>
       		<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
       	  </div>
   
       **MISC CODE REMOVED**	
   
       	<div id="middle" class="clearfloat">
       	<?php $display_categories = array(45,4,7,13,1); $i = 1;
       	foreach ($display_categories as $category) { ?>
   
       	<div id="cat-<?php echo $i; ?>" class="category">
       		<?php query_posts("showposts=1&amp;cat=$category")?>
       		<span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span>
       	</div>
   
       	<?php $i++; ?>
           	<?php } ?>
   
       	</div>
   
       	<?php } ?>
   
       	<div id="bottom" class="clearfloat">
   
       	<div id="front-list">	
   
       <?php
             $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
             query_posts("cat=-5,-6&amp;paged=$page&amp;posts_per_page=5"); ?>
       <?php while (have_posts()) : the_post(); ?>		
   
       	<div class="clearfloat">
       	<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark">
       	  <?php the_title(); ?>
       	</a></div>
       	<div id="metawrap">
       	<h3 class="cat_title"><?php the_category(' | '); ?> &amp;raquo</h3>
       	<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>
       	</div>
       	<div class="spoiler">
       	<?php	$values = get_post_custom_values("Image");
       	if (isset($values[0])) { ?>
             <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
       	<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_option('home'); ?>/<?php
       $values = get_post_custom_values("Image"); echo $values[0]; ?>&amp;w=300&amp;h=150&amp;zc=1&amp;q=100"
       alt="<?php the_title(); ?>" class="left" width="300px" height="150px"  /></a>
             <?php } ?>
   
       	<?php excerpt('40'); ?>
       	</div>
       	</div>
   
             <?php endwhile; ?>
   
       	<div class="navigation">
       		<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
       			else { ?>
   
       			<div class="right"><?php next_posts_link('Next Page &raquo;') ?></div>
       			<div class="left"><?php previous_posts_link('&laquo; Previous Page') ?></div>
       			<?php } ?>
   
       	</div>
       	</div>
   
       	<?php get_sidebar(); ?>
   
       	</div>	
   
       <?php get_footer(); ?>
       ```
   
 * Thank y9ou so much for your time and your help.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [bespokeordie](https://wordpress.org/support/users/bespokeordie/)
 * (@bespokeordie)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/php-featured-section-help/#post-1046230)
 * Bumpy bump bump
 *  Thread Starter [bespokeordie](https://wordpress.org/support/users/bespokeordie/)
 * (@bespokeordie)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/php-featured-section-help/#post-1046248)
 * So if no one can help, can someone tell me why? Or a good research site to figure
   it out on my own. What little I know about php I took from trial and error.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘.php featured section help…’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [bespokeordie](https://wordpress.org/support/users/bespokeordie/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/php-featured-section-help/#post-1046248)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
