![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I would like to have the middle section in the classic Executive theme show contents from a post instead of a page. Assuming the Post is assigned to category 4 What Do I need to change in the following home.php code to accomplish this:
<div class="hpmain"> <div class="hpmainleft"> <?php $recent = new WP_Query('page_id='.get_theme_mod('hp_main')); while($recent->have_posts()) : $recent->the_post();?> <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php the_content_limit(600, ""); ?> <p><a rel="nofollow" class="more-link" href="<?php the_permalink() ?>"><?php _e("Read more", 'studiopress'); ?></a></p> <?php endwhile; ?> </div> |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I show full post content on front page? | onmillertime | General Discussion | 3 | 03-12-2010 02:18 PM |
| making a change in the main featured post | ronfrank | General Discussion | 16 | 03-02-2009 02:45 PM |
| Change drop down menu to show top level categories as main? | tatiana | General Discussion | 2 | 02-05-2009 08:28 PM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us