![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello All,
I have a widget titled featured post on a sidebar menu. Does anyone know how to change that featured post? I looked at the home.php and I believe this to be the code that handles that portion (understand this was a theme modified by someone else and I've been tasked to fix it). I would like to be able to choose what featured post I want to show. <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_righ t')); ?>" rel="bookmark"><?php echo __("Read More Posts From ", 'studiopress')." ".$cat->name; ?></a></strong> </div> If anyone can offer any help that would be great thanks! |
| Thread Tools | |
| Display Modes | |
|
|
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us