Support » Plugins and Hacks » Insert PHP » php url? Newbie

  • Resolved Kimber254

    (@kimber254)


    I need to get /wp-content/plugins/woocommerce/templates/myaccount/my-downloads.php to show up on one page so customers can look back at the download history. What do I do?

    I tried

    [insert_php]
    $FileLocation = “wp-content/plugins/woocommerce/templates/myaccount/my-downloads.php”;
    include($_SERVER[‘DOCUMENT_ROOT’].$FileLocation);
    [/insert_php]

    and I tried

    [insert_php]
    echo ‘Server date and time is: ‘;
    echo date(‘l, F j, Y \a\t G:i:s’);
    [/insert_php]

    With all my php codes inserted between the insert_php.

    Please advice
    Thank you

    http://wordpress.org/plugins/insert-php/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WillBontrager

    (@willbontrager)


    Kimber, if this doesn’t work:

    [insert_php]
    echo 'Server date and time is: ';
    echo date('l, F j, Y \a\t G:i:s');
    [/insert_php]

    Then:

    1. Ensure the Insert PHP plugin is installed.

    2. Ensure the plugin is activated.

    3. When adding the code to posts or pages, use the “Text” tab instead of the “Visual” tab.

    Test things until the above code works on your page. Then, modify it with your custom content.

    To test custom content, save the PHP code to a separate web page. Replace [insert_php] with <?php and replace [/insert_php] with ?>

    Put the test web page on your server and type its URL into your browser.

    ~ If it works, then it should also work with the plugin (<?php and ?> replacements reversed first, of course).

    ~ If it doesn’t work on the separate test page, fix what needs fixing until it does work. Then use the code with the plugin.

    Will

    Plugin Author WillBontrager

    (@willbontrager)


    Gratuitous post to mark thread resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php url? Newbie’ is closed to new replies.