A common problem with the fantastic “The Morning After” theme by Arun Kale is getting the Featured Area to work. I have one solution that might be what you are looking for!
Use the following as an easier implementation and FIX for featured posts!
Arun: if you want to incorporate these changes feel free!
In home.php copy the following text and place it where the old “home_featured” was.
<div id="home_featured"> <!-- start home_featured -->
<h3 class="home_featured">Featured Posts</h3>
<?php $the_query = new WP_Query('category_name=featured&showposts=5&orderby=post_date&order=desc');
while ($the_query->have_posts()) : $the_query->the_post();
$do_not_duplicate = $post->ID; ?>
<div class="feat_content">
<?php if ( get_post_meta($post->ID, 'featured_home_img', true) ) { ?>
<div class="feat_thumb"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/featured/<?php echo get_post_meta($post->ID, "featured_home_img", $single = true); ?>" alt="<?php the_title(); ?>" /></a></div>
<?php } ?>
<div class="feat_title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></div>
<div class="feat_exc">
<p><?php the_content_rss('', FALSE, '', 30); ?></p>
</div>
</div>
<?php endwhile; ?>
</div> <!-- end home_featured -->
Then in sidebar.php copy the following text and replace it where the old “h3 class=categories” was.
<h3 class="mast">Categories</h3>
<?php $catid = $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE cat_name='Asides'"); ?>
<?php $featcat = $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE cat_name='Featured'"); ?>
<ul class="cat">
<?php
wp_list_categories('title_li=&sort_column=name&show_count=0&show_last_updated=
1&use_desc_for_title=1&exclude=' .$catid. "," .$featcat. '') ?></ul>
All that is left, is to make a ‘Featured’ category, without the quotes… add a post to it and viola!
Popularity: 15% [?]
on Sep 21st, 2007 at 10:16 am
One problem with this setup is that posts with images and captions according to Arun’s method will show the caption as the first part of the post text. If you can fix that I’ll gladly hit you with a paypal donation because I like your hack.
on Sep 21st, 2007 at 10:36 am
nils, i’ll give it a try, it’ll probably involved using a hook in the_content(), I’m not at home right now but I’ll see what I can do tonight and email you back asap.
p.s. donations are nice, but i really just do this (hacks/fixes/themes) for everyone’s benefit. your call not mine!
on Sep 28th, 2007 at 2:03 am
Awesome, used it and it worked perfectly. check out my site at http://www.olliemag.com to see your hard work in action!
on Sep 28th, 2007 at 2:38 am
@olliemag, glad it worked for you. I think the whole isfeatured = yes thing was a little whack. Nice implementation of the morning after theme! (and yes skate DOES suck)