Support » Plugin: Shortcode Exec PHP » [Plugin: Shortcode Exec PHP] Shortcode posts as text

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor M66B

    (@m66b)

    What do you mean by “it simply posts as text” ?
    How is your shortcode defined?

    Hi, Marcel:

    I am using the default shortcode that was included with your plug-in.

    extract(shortcode_atts(array('arg' => 'default'), $atts));
    echo "Hello world!" . PHP_EOL;
    echo "Arg=" . $arg . PHP_EOL;
    echo "Content=" . $content . PHP_EOL;

    If you check the site, I have examples executing (or attempting to execute) the code in both posts and pages.

    Plugin Contributor M66B

    (@m66b)

    I don’t see anything wrong. ‘hello_world’ is the name of the plugin, so you should use the shortcode [hello_world] in your posts or [hello_world arg="Bob"]).

    I think that I see the problem.

    Instead of

    [shortcode arg="hello_world"]

    I should be doing this

    [hello_world arg="Joe"]

    This is what happens when I attempt to work on my site late at night when I should be in bed. 🙂

    Thanks, Marcel!

    Plugin Contributor M66B

    (@m66b)

    Maybe the argument should have been called ‘Arghhh’ 😉

    Haha, yeah, it was coming to that! 🙂

    Thanks again!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Shortcode Exec PHP] Shortcode posts as text’ is closed to new replies.