This is easy to fix for your needs. Here’s an alternative function you can use which you can put anywhere in your theme’s functions.php file:
1 2 3 4 5 6 7 8 | function robins_get_the_excerpt($post_id) { global $post; $save_post = $post; $post = get_post($post_id); $output = get_the_excerpt(); $post = $save_post; return $output; } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.