Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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


  #1  
Old Oct 21, 2010, 06:44 AM
bigliettaio's Avatar
bigliettaio
 
128 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, 08:23 PM
juggledad's Avatar
juggledad
 
23,687 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Oct 30, 2010, 09:54 AM
bigliettaio's Avatar
bigliettaio
 
128 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
  #4  
Old Dec 1, 2010, 09:04 AM
bigliettaio's Avatar
bigliettaio
 
128 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 12:38 PM
SwitchLang Function Lyryanne Atahualpa 3 Wordpress theme 0 Feb 2, 2010 05:46 AM
Call to undefined function the_post_thumbnail() anatta Page & Category Menu Bars 3 Jan 23, 2010 09:47 AM


All times are GMT -6. The time now is 12:02 PM.


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