Hi, I have Succeeded in getting user post count. this worked for me:
<p class=”author-meta”>
<span class=”listing-count”><?php printf( __( ‘%d Listing Created’, ‘wp-job-manager’ ), count_user_posts($current_user_id = get_current_user_id(), “job_listing” ) ); ?></span></p>
But with slug structure i failed.
I tried:
add_filter( ‘submit_job_form_save_job_data’, ‘custom_submit_job_form_save_job_data’, 10, 5 );
function custom_submit_job_form_save_job_data( $data, $post_title, $post_content, $status, $values ) {
$job_slug = array();
$job_slug[] = $post_title;
$data[‘post_name’] = implode( ‘-‘, $job_slug );
// Prepend location
if ( ! empty( $values[‘job’][‘job_location’] ) )
$job_slug[] = $values[‘job’][‘job_location’];
return $data;
}