Title: astro604's Replies | WordPress.org

---

# astro604

  [  ](https://wordpress.org/support/users/astro604/)

 *   [Profile](https://wordpress.org/support/users/astro604/)
 *   [Topics Started](https://wordpress.org/support/users/astro604/topics/)
 *   [Replies Created](https://wordpress.org/support/users/astro604/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/astro604/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/astro604/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/astro604/engagements/)
 *   [Favorites](https://wordpress.org/support/users/astro604/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [AstickyPostOrder featured categories = failure](https://wordpress.org/support/topic/astickypostorder-featured-categories-failure/)
 *  [astro604](https://wordpress.org/support/users/astro604/)
 * (@astro604)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/astickypostorder-featured-categories-failure/#post-967673)
 * Can someone please help with what I need to adjust the following code to make
   the featured categories show the posts on the home page. I’m not sure what need
   to change.
 * This is part of the code that is on my home.php page using the studiopress lifestyle
   theme:
 *     ```
       <div class="hpfeatured">
       			<h3><?php echo cat_id_to_name(get_theme_mod('featured_top_right')); ?></h3>
   
       				<?php $recent = new WP_Query("cat=".get_theme_mod('featured_top_right')."&showposts=".get_theme_mod('featured_top_right_num')); while($recent->have_posts()) : $recent->the_post();?>
       				<?php if( get_post_meta($post->ID, "thumb", true) ): ?>
       				<a href="<?php the_permalink() ?>" rel="bookmark"><img class="thumb" src="<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>&h=<?php echo get_theme_mod('featured_top_right_thumb_height'); ?>&w=<?php echo get_theme_mod('featured_top_right_thumb_width'); ?>&zc=1" alt="<?php the_title(); ?>" /></a>
       				<?php else: ?>
       				<?php endif; ?>		
   
       				<strong><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></strong>
       				<?php the_content_limit(80, ""); ?>
   
       				<hr/>
   
       				<?php endwhile; ?>
       				<?php $cat = get_category(get_theme_mod('featured_top_right')); ?>
       				<strong><a href="<?php echo get_category_link(get_theme_mod('featured_top_right')); ?>" rel="bookmark"><?php echo __("Read More Posts From ", 'studiopress')." ".$cat->name; ?></a></strong>
   
       			</div>
       ```
   

Viewing 1 replies (of 1 total)