Farukest
Farukest

Reputation: 1518

How to use shortcode of any plugin to show it visually where i want?

I don't know much about shortcode. I have a countdown plugin with this plugin i'm displaying 'countdown timer', i can post it with shortcode E.g [countdown event="Event with hour & minutes" date="12 June" hour="18" minutes="54"]. I tried to fetch it with get_post_field('post_content', $post->ID) but with this way I can not displaying the 'countdown timer' as visually, just fetch the lettering. Is it possible to show countdown plugin with shortcode where i want. Hope you can help. I really need it.

Upvotes: 0

Views: 154

Answers (1)

Howli
Howli

Reputation: 12469

Try changing

get_post_field('post_content', $post->ID)

to

echo do_shortcode(get_post_field('post_content', $post->ID));

It should work.

Upvotes: 1

Related Questions