0

I installed the WP Issuu plugin on a site and tried to use do_shortcode() to render the shortcode in the template file. Strangely it doesn't work, although it does for the [gallery] shortcode.

I.e. this works:

echo do_shortcode('[gallery link=file]');

But this doesn't work:

echo do_shortcode('[issuu width=420 height=272 documentId=120118010023-8b7bf623bdd642d98252f310d62f1625]');

After some research, I found that this would work too:

echo apply_filters('the_content', '[issuu width=420 height=272 documentId=120118010023-8b7bf623bdd642d98252f310d62f1625]');

Any idea what's going on and how I can solve this? Thanks

1 Answer 1

3

WP Issuu plugin doesn't use the shortcode API. So you can't use it like a regular shortcode. The plugin is a filter for the_content, that's why your solution did work.

If you want to solve this (use do_shortcode) you have to rewrite the plugin so it uses the shortcode API.

0

Your Answer

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

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