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 »

Static front page - can display posts but want excerpts


  #1  
Old May 26, 2010, 11:41 AM
Mikef
 
2 posts · May 2010
Help 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??
  #2  
Old May 26, 2010, 11:48 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you will need to use the wordpress function the_excerpt() (see http://codex.wordpress.org/Template_Tags/the_excerpt)
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old May 26, 2010, 12:17 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
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?
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #4  
Old May 26, 2010, 12:42 PM
Mikef
 
2 posts · May 2010
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.
  #5  
Old Jun 13, 2010, 07:50 AM
almondp1
 
2 posts · Jun 2010
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
  #6  
Old Jun 17, 2010, 08:12 PM
Sascha2
 
2 posts · Jun 2010
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
  #7  
Old Jun 17, 2010, 08:19 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
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.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks

Tags
excerpts, loop, static page

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] excerpts on front page harty Excerpts, Read more, Pagination 1 Feb 14, 2010 02:07 PM
[SOLVED] Display only one category in front page posts majofa Post-Kicker, -Byline & -Footer 8 Dec 24, 2009 01:36 PM
[SOLVED] Need static header image to display on the front page but no image on any o joaodagraca Header configuration & styling 2 Aug 10, 2009 01:45 AM
Inserting Excerpts into Static Front Page Mac Excerpts, Read more, Pagination 0 Feb 28, 2009 04:30 AM


All times are GMT -6. The time now is 04:03 PM.


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