StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-21-2010, 02:25 PM
rharejr rharejr is offline
Registered User
Pro Plus Member
 
Join Date: Mar 2009
Posts: 52
Default How Do I Change the Main Content to show a Post instead of a Page

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -5. The time now is 03:54 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.