GET the excerpt by ID

Why is it that one cannot get the excerpt by ID like with the title and most other elements. eg. get_the_excerpt(ID). I know how to use it with the $post->post_excerpt function but that does not return part of the content if no excerpt was entered it simple returns nothing. So what I am trying to … Read more

Get excerpt using get_the_excerpt outside a loop

I have a code that call get_the_title() and it works, but get_the_excerpt() return empty. How can i make it work? This code is inside a plugin called “WP Facebook Open Graph protocol”. Here’s the part i want to change: if (is_singular(‘post’)) { if (has_excerpt($post->ID)) { echo “\t<meta property=’og:description’ content=””.esc_attr(strip_tags(get_the_excerpt($post->ID))).”” />\n”; }else{ echo “\t<meta property=’og:description’ content=””. … Read more

Allow HTML in excerpt

Here is my excerpt code. // Generate custom excerpt length function wpbx_excerpt_length($length) { return 300; } add_filter(‘excerpt_length’, ‘wpbx_excerpt_length’); How do I allow html like <a> <b> <i> <br> 3 COMPLETE GUIDE TO EXCERPTS I’ve recently answered a few questions regarding excerpts, so I’m going to give a detailed explanation covering as much as I can. … Read more