WordPress.org

Ready to get started?Download WordPress

Forums

Insert PHP
[resolved] php url? Newbie (3 posts)

  1. Kimber254
    Member
    Posted 11 months ago #

    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/

  2. WillBontrager
    Member
    Plugin Author

    Posted 11 months ago #

    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

  3. WillBontrager
    Member
    Plugin Author

    Posted 10 months ago #

    Gratuitous post to mark thread resolved.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.