• Resolved flamuren

    (@flamuren)


    Hi, does anybody know how to display a counter that shows the amount of jobs ones website have?

    Best regards,

    Flamur

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter flamuren

    (@flamuren)

    I try to understand if I can use this code:

    https://www.wpbeginner.com/plugins/how-to-show-total-number-of-posts-in-wordpress/

    However I dont know what to change to just grab job posts. Is anybody familiar with how to edit that code to make it fit for WPJM job count? ??

    Thread Starter flamuren

    (@flamuren)

    I think I managed to figure it out:

    “function wpb_total_posts() {
    $total = wp_count_posts($type = ‘job_listing’)->publish;
    return $total;
    }
    add_shortcode(‘total_posts’,’wpb_total_posts’);”

    mnutt (a11n)

    (@michaelnutt)

    Hi @flamuren,

    I’m glad to hear you were able to get that working, and thanks for posting the solution! That will be helpful other users looking to try the same thing.

    I’ll go ahead and close the thread, but feel free to reach out again if you have any other questions!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display counter of jobs’ is closed to new replies.