I've paid to someone to create a theme for me. Everything works fine, except the excerpt on category posts.

It only shows an excerpt of the post ( not image ) and when I add a shortcode in the excerpt, it show this as text and doesn't compile it

When I go to full post, the image and shortcodes works well.

I can add the image on top of the post by using image post type and set feature image, but it will be ugly in full post and still problem with shortcodes in shortpost

What can I do? My designer is out of touch and does not answer me after receiving his money.

2 Answers 2


To get shortcodes to work in the excerpt you'll have to add a filter to your functions.php file (found inside your theme folder).

add_filter('the_excerpt', 'do_shortcode');

Your other question about the images not showing is hard to answer without knowing how your theme code is like. It has to do with how your designer build the category pages.

If you want to show the full posts instead of just the excerpt, find the file responsible to render the category loop (probably: category.php), and in that file where it says the_excerpt();replace that with the_content();

  • Thanks so much , replace that with the_content(); works for show image in shortpost !! but still my video shortcodes not work even when i add add_filter('the_excerpt', 'do_shortcode'); to function.php
    – Arioman
    Sep 20, 2014 at 14:50

Please use

<?php echo do_shortcode( $content ) ?>

instead of "plain" shortcode. It's very hard to tell you what you shut do because the problem you have written about is very simple specified. Beacuse i can't comment I will try help you by replying for this answer if problem will occured again


add_filter('the_excerpt', 'do_shortcode');

to the end of functions.php file in your theme directory

Works for me

Best regards

  • thanks for reply my friend , i put add_filter('the_excerpt', 'do_shortcode'); in my function.php but nothing change still shortcode not compile in shortpost what you mean about : <?php echo do_shortcode( $content ) ?> for example if my shortcode is [video] where i must put it ??
    – Arioman
    Sep 20, 2014 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.