[Plugin: Job Manager] Shortcode for Display Start date (6 posts)

  1. DGWordPressUser
    Posted 6 years ago #

    I tried searching, but did not find a way or anything in the forum.

    Is there a short code for 'Display Start date'. I would like to use it in the Job List template.

    Currently I added a new field but it seems unnecessary to have to enter the date twice.

    Love the plugin by the way!


  2. Gary Pendergast
    Posted 6 years ago #

    This shortcode currently doesn't exists, but I agree that it should - I'll add it in version 0.8.

  3. DGWordPressUser
    Posted 6 years ago #

    Great, thank you.

  4. Gary Pendergast
    Posted 6 years ago #

    For reference (and if there are any other shortcodes you feel are missing):

  5. Ghalebi
    Posted 6 years ago #

    This was useful for me too. I think all fields of Adding Job form should have their own shortcodes so to offer full flexibility to the user.

    Can't wait till releasing 0.8!

    Thanks Pento, and keep the great work on!

  6. aendrew
    Posted 5 years ago #

    I just had to hack this code in so this can adequately fill a need I have. Anyone needing [job_startdate] and [job_enddate] shortcodes, read on.

    Add the following at around line 110 in frontend-shortcodes.php:

    case 'job_enddate':
                           $displayenddate = get_post_meta( $jobman_shortcode_job->ID, 'displayenddate', true );
                           return $displayenddate;
                    case 'job_startdate':
                           $displaystartdate = date( 'Y-m-d', strtotime( $jobman_shortcode_job->post_date ) ) ;
                           return $displaystartdate;

    ...And update line 50 in job-manager.php to read:

    $jobman_shortcodes = array( 'job_loop', 'job_row_number', 'job_id', 'job_highlighted', 'job_odd_even', 'job_link', 'job_icon', 'job_title', 'job_field', 'job_field_label', 'job_categories', 'job_category_links', 'job_field_loop', 'job_apply_link', 'job_checkbox', 'job_apply_multi', 'job_page_count', 'job_page_previous_link', 'job_page_previous_number', 'job_page_next_link', 'job_page_next_number', 'job_page_minimum', 'job_page_maximum', 'job_total', 'current_category_name', 'current_category_link', 'job_enddate', 'job_startdate');

    Note the 'job_enddate', 'job_startdate' bit appended to the end of that array. This is necessary and confused me for at least ten minutes.


Topic Closed

This topic has been closed to new replies.

About this Topic