WP Job Manager
[resolved] Show Expiry Date (6 posts)

  1. lwyndham
    Posted 2 years ago #

    Does anyone know how to display the expiry date for both...

    A) the Single Job Listing template

    B) and for the Job listings [job] in a similar way it appears in the Job dashboard [job_dashboard]

    I image it has something to do with the template tag _job_expires but as of yet I have had no joy getting it to work.

    Any help will be much appreciated.



  2. Mike Jolley
    Plugin Author

    Posted 2 years ago #

    If you override the templates using this method https://github.com/mikejolley/WP-Job-Manager/wiki/Template-overrides you can add the date in there yourself.

    <?php echo ( $expires = get_post_meta( $post->ID, '_job_expires', true ) ) ? date_i18n( get_option( 'date_format' ), strtotime( $expires ) ) : '&ndash;'; ?>

  3. lwyndham
    Posted 2 years ago #

    Worked a treat - I'm very impressed by your excellent support.

    Thanks for your help and the great plugin!!!

  4. Mike Jolley
    Plugin Author

    Posted 2 years ago #

    Great! Feel free to leave a review :)

  5. shorif2000
    Posted 1 year ago #

    i have tried this but i cannot see a field called _job_expires. using the following in a template file
    <?php $custom_fields = get_post_custom( $post) ;print_r($custom_fields); ?>

    provides me with

    Array ( [_filled] => Array ( [0] => 0 ) [_featured] => Array ( [0] => 0 ) [_job_title] => Array ( [0] => UK Legal Counsel (Contract Manager and Business Support) ) [_job_location] => Array ( [0] => Woking, United Kingdom ) [_job_description] => Array ( [0] =>

  6. Mike Jolley
    Plugin Author

    Posted 1 year ago #

    It's only set when a job is published, based on the 'expirey' setting (days).

    p.s Please don't hijack other users threads, the moderators don't like that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Job Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic