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 » Center area post/pages » Excerpts, Read more, Pagination »

[SOLVED] Working with the_excerpt function


  #1  
Old Oct 21, 2010, 05: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, 07:23 PM
juggledad's Avatar
juggledad
 
23,765 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, 08: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, 08: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 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 10:38 AM.


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