Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Excerpts, Read more, Pagination »

[SOLVED] Working with the_excerpt function


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Oct 21, 2010, 05:44 AM
bigliettaio's Avatar
bigliettaio
 
124 posts · Nov 2009
Italy
What i have to do to obtaining the excerpt of a specific post using
PHP Code:
<?php the_excerpt(); ?>
?

Thanks
  #2  
Old Oct 27, 2010, 12:28 PM
STB
 
762 posts · Apr 2010
Yes.

From the wp codex:
Quote:
<?php the_excerpt(); ?>

Description
Displays the excerpt of the current post with [...] at the end, which is not a "read more" link. If you do not provide an explicit excerpt to a post (in the post editor's optional excerpt field), it will display an automatic excerpt which refers to the first 55 words of the post's content. Also in the latter case, HTML tags and graphics are stripped from the excerpt's content. This tag must be within The Loop.
http://codex.wordpress.org/Function_...ce/the_excerpt
  #3  
Old Oct 27, 2010, 07:23 PM
juggledad's Avatar
juggledad
 
19,994 posts · Mar 2009
OSX 10.6.8/10.7.3 WP 2.8.x/2.9.x/3.x Atahualpa 3.5.x/3.7.x Safari 5.x Firefox 11 XP
to get an excerpt of a particular post, you have to know the ID of the post and if you want to use the_excerpt(), then you have to do a wp_query to get that post from the database.

If you are going to get into this type of thing, then you should start reading the documentation at wordpress.org and/or pickup a book on wordpress so you can learn how to write your own plugin
  #4  
Old Oct 30, 2010, 08:54 AM
bigliettaio's Avatar
bigliettaio
 
124 posts · Nov 2009
Italy
Hi JD,
thanks for the suggestions, but i do not need to write a new plugin anymor, i would like only to make faster thant and copy and paste my Front Page.
Anyway i will tke care about your suggestion and i make some test in the nest few days
  #5  
Old Dec 1, 2010, 08:04 AM
bigliettaio's Avatar
bigliettaio
 
124 posts · Nov 2009
Italy
Hi JD,
at the end i solved using <?php get_post(); ?> function:

<?php
$my_id = 239;
$post_id_239 = get_post($my_id);
echo $post_id_239->post_excerpt;
?>

Cheers

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] page align not working IE, but working in other browsers + headers not rotat mafgirl Atahualpa 3 Wordpress theme 12 Sep 21, 2010 11:38 AM
SwitchLang Function Lyryanne Atahualpa 3 Wordpress theme 0 Feb 2, 2010 04:46 AM
Call to undefined function the_post_thumbnail() anatta Page & Category Menu Bars 3 Jan 23, 2010 08:47 AM


All times are GMT -6. The time now is 06:12 AM.


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