Jump to content


Photo

Having blog recent posts and feature template on same homepage


This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1 sanjib

sanjib

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts

Posted 12 February 2010 - 02:21 PM

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

#2 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 13 February 2010 - 02:29 AM

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.

#3 sanjib

sanjib

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts

Posted 13 February 2010 - 11:07 AM



#4 imagemarket

imagemarket

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 15 February 2010 - 05:23 AM

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.

#5 imagemarket

imagemarket

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 15 February 2010 - 02:54 PM

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.