Include default functions and methods

I’m starting a new service for a customer consisting in adding a input API in their WP website. I started by creating a blank page on the root but then I realized I couldn’t access all methods and function to insert datas in WP.
Basically I need to insert strings and integers as custom post types and meta datas.

What would be the best way to make default functions and methods accessible in my script?

Read More

Thanks!

Related posts

Leave a Reply

1 comment

  1. Put this code in the top of your api page, it will call in the functions, but you need to tell wordpress NOT to try and draw a page as well

    define('WP_USE_THEMES', false); // Tell wordpress not to draw out a page
    require('/path/to/public_html/wp-load.php'); // load wordpress functions