I am developing a plugin. In my ranking.php, I have a form with the action called detailpage.php, which also resides with ranking.php. I want to add the activated themes header and footer to table_detail.php, but it is throwing errors (e.g “Call to undefined function get_theme_root_uri()“)
How can I achieve this functionality (without the error)?
This is my ranking.php form:
<form id="detail_form" method="POST" action="http://localhost/rating/wp-content/plugins/ranking/table_detail.php" target="_blank">
<input type="text" name="detail_data" id="detail_data">
<input type="submit">
</form>
1 Answer
By adding wp-blog-header.php in the files that reside outside wordpress you can use all the wordpress functionality. Thanks to the answer found here.