0

So basically I'm working on a job website for a client where they post jobs and users can apply for these jobs with a form that writes to the database with their inputed information..

I have set up a jobs custom post type where the client posts a job and within the single post(job) I would like to display the applicants submitted content for that single job?

So my form I have on every job single page writes to my wordpress database in a table with (Name, Email, CV, CoverLetter, JobID, uniqID, Date, IP) information but I cant workout how to get this showing the correct data to the relevant job in the backend of wordpress

I hope thats makes sense, I struggled to explain it clearly!

EDIT

I have a solution! This function adds a custom metabox to my post type

function applicants_metabox() {
    $postTypes = array('jobs'); //Asign to post types
    foreach ($postTypes as $postType) {
        add_meta_box(
            'myplugin_sectionid', __('Applicants', 'applicants_domain'), 'applicants_database', $postType
        );
    }
}
add_action('add_meta_boxes', 'applicants_metabox');

I then have another function querying the database

function applicants_database($post) {
    global $wpdb;
    $tableWorking = $wpdb->prefix.'blahblah';
    $getApplicants = $wpdb->get_results("SELECT `id`, `Name`, `Email`, `CV`, `Letter`, `JobID`, `uniqID`, `Date`, `IP` FROM `blahblah`");
}
  • Have you already pushed this live? I would suggest having jobs as a custom taxonomy and applicant being a custom post type where the job acts as a de facto "category". – Andrew Bartel Feb 17 '14 at 20:39
  • Sadly I'm to far into the build to change this, but I have come up with a solution :) check my edit – Levi Cole Feb 18 '14 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.