• Resolved phpchick

    (@phpchick)


    I have a blank php file that I want to use to get some values out of wp_option.

    I’m testing with

    echo get_option(‘widget_predictionlogwidget’);

    but am getting a “server error”

    Is there some line of code I have to add to the php file to be able to use this?

    I know I have to make the file recognizable to wordpress (since get_option is a wordpress specific function if Im not mistaken) but not exactly sure how to do that.

Viewing 1 replies (of 1 total)
  • Thread Starter phpchick

    (@phpchick)

    looks like you have to include the wp-config.php file, which is what I added:

    include “../public_html/wp-config.php”;

Viewing 1 replies (of 1 total)
  • The topic ‘enabling a file to use get_option function’ is closed to new replies.