custom post type by author - wp job manager
Hy, I am working with wp job manager, and I would like to list job applications by user, under ultimate member tabs. I have tried using this code, but it shows me all applications
function custom_shortcode() {
$args = array( 'post_type' = 'job_application',
'author'=$author_id, );
$loop = new WP_Query( $args );
while ( $loop-have_posts() ) : $loop-the_post();
the_title();
echo 'div class="entry-content"';
the_content();
echo '/div';
endwhile;
}
add_shortcode( 'query_my_posts', 'custom_shortcode' );
Also i have tried this method https://suiteplugins.com/how-to-change-the-post-type-on-ultimate-member-posts-tab/
But no luck, any help?
Topic file-manager php custom-post-types Wordpress
Category Web