I'm putting together a WordPress site for a charity organization which upgrades the look & feel of their existing site. Their existing site had a few PHP scripts and an events database for their project listings and I changed the output so that the script emulates the WordPress UI using:
define( 'WP_USE_THEMES', true );
require_once "wp-load.php";
The site uses the Monarch social plugin to enable sharing and I need to have that work on the emulated project page.
I haven't been able to find what I should include.
I tried adding both of these lines, separately, but they had no affect:
require_once "wp-content/plugins/monarch/monarch.php";
require_once "wp-content/plugins/monarch/core/init.php";
Upon looking at the code and trying to call functions that looked like potential functions to execute it, they resulted in an error or does nothing.
As someone completely unfamiliar with the intricacies of WordPress doing a pro bono favor for a charity organization, I did not realize that page templates could be used as the destination for custom PHP code accessing a non-WordPress database, etc.
The solution steps (which may hopefully help someone else equally unaware of WordPress) are as follows:
This may be basic for people who live in WordPress but it wasn't immediately clear to me.
Thanks to the comments by @ChrisHaas!