Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Excerpts, Read more, Pagination (http://forum.bytesforall.com/forumdisplay.php?f=20)
-   -   [SOLVED] Working with the_excerpt function (http://forum.bytesforall.com/showthread.php?t=10532)

bigliettaio Oct 21, 2010 05:44 AM

[SOLVED] Working with the_excerpt function
 
What i have to do to obtaining the excerpt of a specific post using
PHP Code:

<?php the_excerpt(); ?>

?

Thanks

juggledad Oct 27, 2010 07:23 PM

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

bigliettaio Oct 30, 2010 08:54 AM

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

bigliettaio Dec 1, 2010 08:04 AM

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


All times are GMT -6. The time now is 07:10 AM.

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