Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

Putting 2-4 recent post excerpts on static home page aswell as blog page?


 
Prev Previous Post   Next Post Next
  #1  
Old Nov 21, 2011, 12:40 PM
lakewooditsupport
 
48 posts · Jun 2011
England, United Kingdom
Putting 2-4 recent post excerpts on static home page aswell as blog page?

I have been working on a new blog and I have a weird one and I haven't really seen it done before to my knowledge.

I have a dedicated home page and a blog page to display posts, I will be using a 2 column layout on the blog page but I also want to have two of the most recent posts display on the home page?

I assume I would have to use custom fields? or create a div table and call up the code in index.php? Can I steal the code from the index.php file to display as follows

Code:
<table cellpadding="10" cellspacing="10" border="0">
<?php $column = 1; ?>
<?php // The LOOP. Do this for all posts:
while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>

<?php if ($column == 1) echo "<tr>"; ?>

<td class="column<?php echo $col;?>" style="vertical-align: top" width="50%"> 
	
		<?php // Deactivated since 3.6.5
		#include 'bfa://content_inside_loop'; 
		// Uses the following static code instead: ?>
		<?php bfa_next_previous_post_links('Top'); // For SINGLE post pages if activated at ATO -> Next/Previous Navigation  ?>
		<?php /* Post Container starts here */
		if ( function_exists('post_class') ) { ?>
		<div <?php if ( is_page() ) { post_class('post'); } else { post_class(); } ?> id="post-<?php the_ID(); ?>">
		<?php } else { ?>
		<div class="<?php echo ( is_page() ? 'page ' : '' ) . 'post" id="post-'; the_ID(); ?>">
		<?php } ?>
		<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
		<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
		<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
		<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
		<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>
		<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>
		</div><!-- / Post -->	
						
</td>

<?php if ($column == 2) echo "</tr>"; (($column==1) ? $column=2 : $column=1); ?>

<?php // END of the LOOP
endwhile; ?>
</table>
Can someone give me some guidance please?
 

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Plz Help !!i want static Home Page and my recent posts below it the7skulls Center area post/pages 1 Sep 3, 2011 10:21 PM
Static home page but add blog snippets aswell jkfly4 Excerpts, Read more, Pagination 0 Mar 10, 2011 04:18 PM
[SOLVED] If Home Page is static where does blog go? WineButler Center area post/pages 2 Jun 22, 2010 10:05 AM
How Do I Add Recent Post To A Static Front Page??? Sunmarket Excerpts, Read more, Pagination 2 Nov 23, 2009 07:56 PM


All times are GMT -6. The time now is 10:44 PM.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.