wordpress get excerpt by id -


i'm using options framework

and can't work out why doesnt work

$x = of_get_option('post_number'); $content_post = get_post($x); echo $content_post->post_excerpt; 

its odd because

echo of_get_option('post_number'); 

works , outputs number

and according get_post code should work yet echo produces nothing, not error message

so must handeling get_post() incorrectly somehow, clues?


edit

var dump http://pastebin.com/zegq5wpn reveals post_content full post_excerpt empty

how regenerate excerpt?


edit [resolved]

i decided manualy overwrite excerpt option missing, found this

and used

add_post_type_support( 'page', 'excerpt' ); 

to manualy write excerpt

$text = apply_filters('the_excerpt', get_post_field('post_excerpt', $post_id)); 

Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -