create custom page for statistical data capture and reporting

This is a pretty big project you’re talking about.. Using WordPress as the base CMS isn’t necessarily a bad idea as you/an admin could create new users and it would take care of all the logging in procedures.

Firstly I would recommend learning how to make basic WordPress themes. You could try hacking about the default themes but they have a lot of complexities you don’t need. There are plenty of tutorials out there for learning how to do this.

Once you have yourself a basic theme, the main thing to do will be to create various custom page templates that control the views you show to users. So in your basic theme you should have created a file called page.php, to make a custom template add the following to the very top of the file and rename it something like template-my-view.php :

<?php
/*
Template name: My view
*/
?>

Then when you go to add a new page in the admin, you can select “My view” in the “template” dropdown on the right. This means any custom code you put in this file will appear on that page.

Using some code such as this:

http://www.joshstauffer.com/wordpress-redirect-users-after-log-in/

you can control where your users go to after logging in. By default they would be sent to the wordpress admin but you want them to stay in the frontend, so set it up to send them to some kind of frontend homepage you create for your users.

From here it’s a case of learning the necessary PHP/MySQL to actually perform the functions you want to do and display/process them on all the custom page templates you create. There’s no shortcut to this except learning the languages, I would advise buying a book/ebook. You can create custom MySQL tables to sit alongside the WordPress created ones to hold all the data you need to perform the functions you want.

As I say this is a pretty big undertaking and your best bet is to get a book on beginner PHP/MySQL, as well as learn the basics on WordPress theming. From what you’ve said it sounds like the things you actually need to do are fairly straightforward though so once you get the basics you should be good to go.

The above suggestions aren’t really WP best practices, but will do the job, and as you get more involved in WP you can start to discover the power of developing dedicated plugins etc to do what you want to do natively and within the WP infrastructure.

Good luck!

Leave a Comment