Shorcodes work in post but not in manual excerpt

User avatar
moriokfutai
Posts: 3
Joined: 3 years ago

Shorcodes work in post but not in manual excerpt

Postby moriokfutai » 3 years ago

Hi guys,

I try setting up some variable in my posts (so I can easily change them).
The shortcodes I set up for a test work well in the actual post - but do not run at all in the post excerpt (shown on the homepage and category pages).
Please note that I use manual excerpt to personalize the excerpt.

- EX: The post page: http://coolpile.com/gadgets-magazine/ke ... -keyboard/
- EX: The Excerpt Page: http://coolpile.com/page/14/ (if you do not see it on this page, just click last in the pagination feature - I tested on my very first post on this site)

Any ideas how I can get the shortcodes work in the excerpts too?

Thanks in advance.
E
User avatar
vaakash
Site Admin
Posts: 733
Joined: 6 years ago
Location: India
Contact:

Re: Shorcodes work in post but not in manual excerpt

Postby vaakash » 3 years ago

Hello,

You need to use

Code: Select all

echo do_shortcode( get_the_excerpt() );

In your theme's archive.php or category.php file wherever necessary.

Thank you.
User avatar
moriokfutai
Posts: 3
Joined: 3 years ago

Re: Shorcodes work in post but not in manual excerpt

Postby moriokfutai » 3 years ago

Hi Vaakash,

Thanks for the reply.

I tried it, and I get a general error message when accessing http://www.CoolPile.com. It's properly not in the right please.

Would that be too much to ask to post the exact line number where I need to add your code in the 2 php files?

Thanks in advance for your understanding. Although I have some experience in the marketing field, and I can figure out some simple HTML - I am null when it comes to PHP.

E.
User avatar
moriokfutai
Posts: 3
Joined: 3 years ago

Re: Shorcodes work in post but not in manual excerpt

Postby moriokfutai » 3 years ago

Hi guys.

I hoped to be able to use this plugin.
After 3 days of "fighting" with it ... I let go on it.

I decided to go with http://urbangiraffe.com/plugins/sniplets/ and is also works in the excerpts by default.

Sorry.