How do I integrate WordPress into a web app using namespaces?

I’m integrating WordPress into an existing web app. To retrieve posts I’m including wp-load.php which causes function collisions. This is the structure of the web app:

<?php
/* web app code */

include('wordpress/wp-load.php'); //collision happens here

/* web app code */
?>

How can I use namespaces to avoid function collisions?

Related posts

Leave a Reply