Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Shea Bunge, I believe the question Regi Siti is asking is about the

    general syntax of adding the php snippet

    on a page or post.
    I personal installed this plugin on a website I am managing yesterday Sunday 6th/8/2017 but it has taken me now more than 24 hours just to figure out how to add my php snippet functionality on a specific page.

    Brief background
    I created a new snippet. I created a form that has a field which is auto-populated. I wrote some php code (new snippet created earlier) to pick the values for the auto populated field.

    My problem

    global $product;
    echo '<div class="default-btn"><a href="https://website.com/example-url/page?product-name='.urlencode(get_the_title($product->ID)).'">Recommend Product</a></div>';

    This code creates the button but the Code Snippet plugin does not show me how I can add this code to my specific page. Likewise the instructions, they don’t tell me how to use the plugin. Shea Bunge please help me out with this. Kindly also improve the usage instructions for the plugin.

    Thank you.

    Hi Shea Bunge, I believe the question Regi Siti is asking is about the

    general syntax of adding the php snippet

    on a page or post.
    I personal installed this plugin on a website I am managing yesterday Sunday 6th/8/2017 but it has taken me now more than 24 hours just to figure out how to add my php snippet functionality on a specific page.

    Brief background
    I created a new snippet. I created a form that has a field which is auto-populated. I wrote some php code (new snippet created earlier) to pick the values for the auto populated field.

    My problem

    global $product;
    echo '<div class="default-btn"><a href="https://website.com/example-url/page?product-name='.urlencode(get_the_title($product->ID)).'">Recommend Product</a></div>';

    This code creates the button but the Code Snippet plugin does not show me how I can add this code to my specific page. Likewise the instructions, they don’t me how to use the plugin. Shea Bunge please help me out with this. Kindly also improve the usage instructions for the plugin.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)