Forum Replies Created

Viewing 1 replies (of 1 total)
  • 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)