I need to show various excerpt from specific pages..
I found this code:
function get_the_excerpt_here($post_id)
{
global $wpdb;
$query = "SELECT post_excerpt FROM $wpdb->posts WHERE ID = $post_id LIMIT 1";
$result = $wpdb->get_results($query, ARRAY_A);
return $result[0]['post_excerpt'];
}
But I'm not sure how to use it.. I tried
<?php echo get_the_excerpt_here(12); ?>
but it doesn't work..