Hi Mike,
Good point…
This is my modified code:
<div id="job-manager-job-dashboard" class="fifteen columns" style="margin-top:30px;margin-bottom:30px;">
<table class="job-manager-jobs" style="width:100%;">
<thead>
<tr>
<th class="job_title"><?php _e( 'Job Title', 'job_manager' ); ?></th>
<th class="Location"><?php _e( 'Location', 'job_manager' ); ?></th>
<th class="date"><?php _e( 'Date Posted', 'job_manager' ); ?></th>
<th class="status"><?php _e( 'Status', 'job_manager' ); ?></th>
<th class="expires"><?php _e( 'Expires', 'job_manager' ); ?></th>
<th class="actions"><?php _e( 'Actions', 'job_manager' ); ?></th>
</tr>
</thead>
<tbody>
<?php if ( ! $jobs ) : ?>
<tr>
<td colspan="6"><?php _e( 'You do not have any active job listings.', 'job_manager' ); ?></td>
</tr>
<?php else : ?>
<?php foreach ( $jobs as $job ) : ?>
<tr>
<td class="job_title">
<a href="<?php echo get_permalink( $job->ID ); ?>" target="_blank"><?php echo $job->post_title; ?></a><br>
<span class="status"><?php if ( is_position_filled( $job ) ) echo 'Closed'; else echo 'Open to Applications'; ?></span>
</td>
<td class="location"><?php echo $job->_job_location; ?>, <?php $terms = wp_get_post_terms( $job->ID, 'job_listing_region' ); $location = $terms[0];
$locname = $location->name; echo $locname; ?></td>
<td class="date"><?php echo date_i18n( 'd/m/Y', strtotime( $job->post_date ) ); ?></td>
<td class="status"><?php the_job_status( $job ); ?></td>
<td class="expires"><?php
$expires = $job->_job_expires;
echo $expires ? date_i18n( 'd/m/Y', strtotime( $expires ) ) : '–';
?></td>
<td class="actions">
<ul class="job-dashboard-actions">
<?php
$actions = array();
switch ( $job->post_status ) {
case 'publish' :
$actions['edit'] = array( 'label' => __( 'Edit', 'wp-job-manager' ), 'nonce' => false );
if ( is_position_filled( $job ) )
$actions['mark_not_filled'] = array( 'label' => __( 'Mark not filled', 'wp-job-manager' ), 'nonce' => true );
else
$actions['mark_filled'] = array( 'label' => __( 'Mark filled', 'wp-job-manager' ), 'nonce' => true );
break;
}
$actions['delete'] = array( 'label' => __( 'Delete', 'wp-job-manager' ), 'nonce' => true );
$actions = apply_filters( 'job_manager_my_job_actions', $actions, $job );
foreach ( $actions as $action => $value ) {
$action_url = add_query_arg( array( 'action' => $action, 'job_id' => $job->ID ) );
if ( $value['nonce'] )
$action_url = wp_nonce_url( $action_url, 'job_manager_my_job_actions' );
echo '<li><a href="' . $action_url . '" class="job-dashboard-action-' . $action . '">' . $value['label'] . '</a></li>';
}
?>
</ul>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
<?php get_job_manager_template( 'pagination.php', array( 'max_num_pages' => $max_num_pages ) ); ?>
</div>
I just went ahead replaced my modified version of /theme/job-manager/job-dashboard.php with the original from /wp-job-manager/templates/job-dashboard.php, and it still didn’t work. The original took a lot longer to load and refresh, and the jobs were not marked or deleted when I clicked the corresponding actions.
I’m using a page template and putting the shortcode in directly with <?php echo do_shortcode('[job_dashboard]'); ?>
instead of putting it in the page editor via the_content (that’s just how I prefer to work) – surely that’s not the cause of the problem?
Here’s the template code anyway:
<?php
/*
Template Name: Employer - Dashboard
*/
get_header(); ?>
<div id="content" class="sixteen columns" style="padding-top:0;padding-bottom:20px">
<div class="dash-nav sixteen columns" style="margin-bottom:30px;">
<?php wp_nav_menu( array('menu' => 'Employer Dashboard Menu' )); ?>
<a href="<?php echo wp_logout_url('https://studentearners.com/employers/login'); ?>" title="Logout">Logout</a>
</div>
<div class="page-content sixteen columns dashboard" style="margin: 0 0 0 20px;">
<div class="dash-hello-user eight columns">
<?php
global $current_user;
get_currentuserinfo();
echo '<h2 style="padding-left:10px;">Hello, <strong>'.$current_user->user_login.'</strong>!</h2>';
?>
</div>
<div class="dash-submit-new seven columns">
<a href="https://studentearners.com/employers/dashboard/submit-job/" class="submitnew">Create New Job</a>
</div>
<?php echo do_shortcode('[job_dashboard]'); ?>
<div class="dash-bottom eight columns">
<h2>Employer News</h2>
<?php query_posts('cat=176'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="bulletin-content"><h3><?php the_title(); ?></h3>
<?php the_content(); ?></div>
<?php endwhile; endif; ?>
</div>
<div class="dash-bottom seven columns">
<h2>Help</h2>
<div class="help-content">
<li>Frequently Asked Questions</li>
<li>Email Us</li>
<li>Fill in a contact form</li>
<li>Ask us on Twitter</li>
<li>Ask us on Facebook</li>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>