WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Job Manager] Shortcode for Display Start date

[Plugin: Job Manager] Shortcode for Display Start date

Viewing 5 replies - 1 through 5 (of 5 total)
  • This shortcode currently doesn’t exists, but I agree that it should – I’ll add it in version 0.8.

    Great, thank you.

    For reference (and if there are any other shortcodes you feel are missing):
    http://code.google.com/p/wordpress-job-manager/issues/detail?id=170

    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!

    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.

    Hurrah!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Job Manager] Shortcode for Display Start date’ is closed to new replies.