Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Static front page - can display posts but want excerpts (http://forum.bytesforall.com/showthread.php?t=7293)

Mikef May 26, 2010 11:41 AM

Static front page - can display posts but want excerpts
 
Using this forum I now have a static front page which displays my latest 3 posts. I am using ver 3.4.9

I have tried to alter the code I have to display excerpts instead but have drawn a blank.

The code I use in index.php is:

<?php if ( is_front_page() ) { ?>
<?php $my_query = new WP_Query('showposts=3');
while ($my_query->have_posts()) : $my_query->the_post(); ?>

<?php /* This is the actual Wordpress LOOP.
The output can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_inside_loop']); ?>

am I missing something obvious??

juggledad May 26, 2010 11:48 AM

you will need to use the wordpress function the_excerpt() (see http://codex.wordpress.org/Template_Tags/the_excerpt)

lmilesw May 26, 2010 12:17 PM

Hey Mike... I'm curious... Why not just leave the front page to show latest post and use the Atahualpa excerpts settings to show only excerpts and only the last 3 posts?

Mikef May 26, 2010 12:42 PM

juggledad,

thanks for the reply, I have tried using excerpt() and can get it to show the excerpts I want on the static front page, but,,,,,,, I lose other formatting e.g. title, author etc. Am I using it in the right place or is asking to keep it functioning within the theme styling a whole new question?

<?php $my_query = new WP_Query('showposts=3');
while ($my_query->have_posts()) : $my_query->the_post();?>



<?php /* This is the actual Wordpress LOOP.
The output can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content (the_excerpt());($bfa_ata['content_inside_loop']); ?>


lmilesw,
Some of my posts can be quite long so I wanted to get "highlights" onto the front page without pushing them down too far. Also had a bit of an issue getting that functionality to work on my site. One workaround I thought might work is to have the home page as the posts page and have a sticky post to give the welcome blah blah. May try that if I cannot resolve this way.

almondp1 Jun 13, 2010 07:50 AM

HI Mikef

I'm trying to show posts on my static front page as well.

Where do you position this part of code you quoted ?
I tried to insert it just before the get_content in index.php but got an error page.

I found this code as well on 3 steps to search engine success but don't know where to stick it ..

<p>
<h3><font color=#990000><b>Latest posts…. </b></font></h3>
</p>

<?php $temp_query = $wp_query; ?>
<?php query_posts(’showposts=5′); ?>

<?php while (have_posts()) : the_post(); ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></a>
<?php the_excerpt(); ?>
<a href=”<?php the_permalink() ?>”>Read more….</a>
</div>
<?php endwhile; ?>

Cheers

Sascha2 Jun 17, 2010 08:12 PM

Hi everyone:

I am having this same issue.

I want to add a welcome message/post that stays at the top of the main page and then the latest posts to show beneath this ...

I had this working before .. then all of a sudden .. it didn't work.

Page - http://www.bestbusinessyear.com

I'm not sure if some other plugin or upgrade or something else interfered and stopped this from working ...

All I want is a photo (left aligned) with a static message to show first before the post excerpts ...

Help!!

Thanks so much

K:confused:

lmilesw Jun 17, 2010 08:19 PM

You could use a sticky for this or there are several plugins for this. Search on wordpress.org for announcement or front page or frontpage, etc.

juggledad Jun 18, 2010 11:36 AM

Sascha2 - you are not using Atahualpa, I suggest you go ask the author of the theme you are using.


All times are GMT -6. The time now is 08:01 AM.

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