Support » Plugin: WP Job Manager » Override function job_manager_dropdown_categories()

  • Resolved Ivaylo Ivanov

    (@ivaylo-ivanov)


    Hi,

    is there a possibility to override the function job_manager_dropdown_categories( $args = ” ) within the file wp-job-manager-functions.php.

    I would like to show only specific categories in the select box dropdown.

    Thanks for the grate plugin!

    Regards
    Ivaylo

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Hello! I asked our developers for help, and here was the reply:

    The function cannot be overridden and there aren’t any useful WPJM-only filters inside the function itself, however, the function is only used inside of templates that can be overridden. Overriding the job-filters.php and form-fields/term-multiselect-field.php templates and passing the exclude argument from https://github.com/Automattic/WP-Job-Manager/blob/master/wp-job-manager-functions.php#L1030 should get them their desired result.

    The exclude argument is passed to get_terms():
    https://developer.wordpress.org/reference/classes/wp_term_query/__construct/

    Thread Starter Ivaylo Ivanov

    (@ivaylo-ivanov)

    Perfect! Worked awesome.
    Merci 🙂

    Plugin Contributor Jen H.

    (@jenhooks)

    @ivaylo-ivanov — Brilliant! Thanks for following up.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Override function job_manager_dropdown_categories()’ is closed to new replies.