Attempting to integrate PHP tool into Worpdress
-
I’ve created a set of php, js, css, and image files that act as a tool set for a our users. I now would like to integrate it into a WordPress install to take advantage of the our existing user system and layout. The problem is that I have no experience with WordPress. The tool needs to:
Install several tables into WordPress DB and load with initial data
Generate 3 distinct pages with the default WordPress header/menu/footer
Have these 3 pages perform AJAX calls to several other filesI believe that the first part can be done as a plugin, using the register_activation_hook() hook and then running dbDelta() with the CREATE TABLE statements and $wpdb->query() for the data loading. The rest has me stumped, though. From what I’ve read, I THINK I need to also include the AJAX php files in the plugin zip (and register them with add_action(‘wp_ajax_my_) ), and the 3 pages as templates. Is this correct?
I’ve already attempted to build a page with a custom template, but I cannot get my content to show up in the “correct” location on the page. Here’s the basic code:
<?php /* Template Name: Card Chooser Test */ global $wpdb,$themePath; get_header('default'); //ALL MY SCRIPT/STYLE STUFF print “</head><body onload=\”init();\”> wp_nav_menu(array('theme_location'=>'primary','menu'=>'ubermenu' )); //ALL MY DISPLAYABLE STUFF get_footer(); ?>
Is this even the right approach? All I want to use WordPress for in the instance of this tool is to pull in the style and access the user info (I’m integrating the tool into an existing WP install with an established userbase). Is there a smarter/easier way to accomplish this? Am I barking up the wrong tree?
THANK YOU for any insight, and let me know if it would be beneficial to expound upon any element or provide more code!
- The topic ‘Attempting to integrate PHP tool into Worpdress’ is closed to new replies.