Support » Plugin: Embed PDF » Embed PDF using do_shortcode()

  • Resolved adopted3


    Hello: I have “Embed PDF” version 1.04.

    the [embed]...[/embed] shortcode works fine on a page. But when I use do_shortcode within PHP code on a template page, the plugin doesn’t bring up the PDF viewer. Here’s how I’m using it:

    echo do_shortcode('[embed]'.''.'[/embed]');


Viewing 3 replies - 1 through 3 (of 3 total)
  • fyi… i found that this code works:

    global $wp_embed;
    $post_embed = $wp_embed->run_shortcode('[embed][/embed]');
    echo $post_embed;

    not sure why do_shortcode didn’t work.

    Plugin Author Pat Hawks


    I agree, it’s odd that do_shortcode wasn’t working for you.
    Glad you found something that did work, though.

    Yeah, do_shortcode won’t work for me either.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Embed PDF using do_shortcode()’ is closed to new replies.