Hello, I am doing some research on how to to use $wpdb to insert data into a table in my database that is not pre-configured by wordpress...

The Ideal

I am working on a walking website, where a user can register, join a team or go solo, and enter their miles on a weekly basis. As they enter their miles, they will be on a leader board, acquire badges, and have their progress displayed on a Google API map of the Appalachian Trail.

I can do all this on a website I build without Wordpress very easily, but this year I thought I would change it up and learn more about how wordpress works...

The Question(s)

My major issue, is that I am getting pulled in several directions on what would be best practice? Would it be a page template? A plugin I would need to develop? Or should I use a plugin that allows php in I have pages created? Or some other method I have yet to discover?

Thanks in advanced.

1 Answer 1


If i understand well, users will update their datas in front-office, and you need to save datas in your custom table.

I think you must check on wp_ajax process which will allow you to post datas in JS to a WP_ajax handler. This handler will be a PHP function, (can be written in your theme's functions.php) that will insert your datas in your database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.