WordPress.org

Ready to get started?Download WordPress

Forums

PHP Code for posts
[resolved] 2 parameters not working (2 posts)

  1. eoh1
    Member
    Posted 9 months ago #

    I am using your plugin on a site and it's working wonderfully well.

    when I create a simple test item with two parameters, I cannot see the second one.

    Here's my little TestTwoVars

    <?php
    echo $_parameters["var1"];
    echo $_parameters["var2"];
    ?>

    When I call it inside a page, I call it like this. (I tried to pattern it on your suggestion for 1.1 in
    http://wordpress.org/plugins/php-code-for-posts/)

    I go into Text, not Visual portion of editor and type:

    BEFORE 2-var test
    [php snippet=4 param="var1=val1&var2=val2"]
    AFTER 2-var test

    When I view the page, I see my string ABOVE the item and the ending string BELOW the item, but
    val2 doesn't show. Any ideas?

    BEFORE 2-var test
    val1
    AFTER 2-var test

    The Back ticks are placed for this message. Not part of the code :}

  2. The.Missing.Code
    Member
    Plugin Author

    Posted 9 months ago #

    Hi eoh1,

    Due to html entity encoding val2's key is actually amp;var2.

    This was entirely accidental, and I am about to release a fix for this.

    Thank you for pointing this out.
    TMC

Reply

You must log in to post.

About this Plugin

About this Topic