Jump to content
Sign in to follow this  
sanjib

Having blog recent posts and feature template on same homepage

Recommended Posts

sanjib

Hello Currently when you have a feature page template on your homepage, is there any way you can have your latest post being shown underneath? At the moment it only allows you to have a static page? ... thanks Sanjib

Share this post


Link to post
Share on other sites
jnoh

Hey Sanjib :) So we're going to have to make a new document called: page-highlight-posts.php. copy and paste this code into it:

<?php
	if(VPRO) {
	/*
		Template Name: Highlight Page - Posts
	*/
	}?>
	<?php if(VPRO):?>
	<?php get_header(); ?>
	<div id="content" class=" fix">
			<div id="maincontent" class="fix">
			<?php require(PRO.'/template_highlight.php');?>
			<?php require(LIB.'/_sub_head.php');?>
			<div class="clear"></div>
			<?php query_posts(); ?>
				<?php include (LIB . '/_posts.php'); ?>
			</div>
		<?php get_sidebar();?>
	</div>
	<?php get_footer();?>
	<?php endif;?>
	

Save this in the main them directory (WhiteHousePro). You should now have a new Highlight template with posts! Edit highlight text as you normally would.

Share this post


Link to post
Share on other sites
imagemarket

I created the new page-highlight-posts.php as described above, but the 'Add text in admin' H1 message remains even after I update the featuretitle Custom Field... how can I remove that? What I'd really like to be able to do is make the 'Blog' link in the top nav load a new page with the 3 or 4 most recent posts. Please make my day and tell me that this is possible.

Share this post


Link to post
Share on other sites
imagemarket

It might be useful to someone one day if I post the solution to making the Blog link load the latest Blog posts. Click: Settings >> Reading >> Posts Page: Blog simple.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×