Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    Can you elaborate on what you mean “apply for all jobs”. Mark them filled? Expire them?

    Please be more specific.

    Thread Starter bdempleos

    (@bdempleos)

    i would like to do this in all my jobs what i have in my site.

    i would like to insert an expiration date for all the jobs 30 days after the date creation of every job, i know i can do manual but i have to many jobs.

    Plugin Author Mike Jolley

    (@mikejolley)

    If you imported this jobs from an install, how come the expires meta isn’t already set?

    This is a bit complex for me to be doing for you, but you could adapt this https://www.wprecipes.com/wordpress-tip-add-a-custom-field-to-all-posts changing the post type to ‘job_listing’ and setting the meta key ‘_job_expires’ with a hardcoded date (30 days from now for all posts would be easier), e.g. ‘2014-02-05’.

    If you need something more advanced or someone to do this for you (and perhaps other things because you’ve asked quite a few customisation questions :p) you may want to consider posting a job on https://jobs.wordpress.net/

    Thread Starter bdempleos

    (@bdempleos)

    sorry but i don’t understand all what you say.
    the expiration date, can i find as a column in the tables?

    Plugin Author Mike Jolley

    (@mikejolley)

    Expiration data is stored in postmeta, not a dedicated table. The key for the meta is ‘_job_expires’.

    Thread Starter bdempleos

    (@bdempleos)

    ok, and is it any option by sql to insert to all my jobs an specific expire into the field “_job_expires” ?

    Plugin Author Mike Jolley

    (@mikejolley)

    That tut I linked to (https://www.wprecipes.com/wordpress-tip-add-a-custom-field-to-all-posts) should do it no? MyCustomField would be ‘_job_expires’. myvalue would be ‘2014-02-05’ post_type would be ‘job_listing’.

    Here is an example – I just tested it:

    INSERT INTO wp_postmeta (post_id, meta_key, meta_value)
    SELECT ID AS post_id, '_job_expires' AS meta_key, '2014-02-05' AS meta_value
    FROM wp_posts WHERE ID NOT IN
    (SELECT post_id FROM wp_postmeta WHERE meta_key = '_test_expires' AND post_type = 'job_listing');

    You may need to modify the wp_ prefix if you use something else in your database.

    Thread Starter bdempleos

    (@bdempleos)

    Thanks thanks thanks, gracias gracias gracias !!!

    last question, is it possible to put the job date expiration to be 30 days after the creation of the jobs?

    Plugin Author Mike Jolley

    (@mikejolley)

    Probably with a more complex query, but I can’t spend time building that right now ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘query sql for expire date’ is closed to new replies.