Category dropdown sorting and hierarchy needed in "add job" page

Hi there - when adding a new job on the "add job" page of your jobs and experts plugin, the categories all appear in alphabetical order. How do I sort them according to hierarchal structure, as the current sorting does not make sense to users.

  • Ivan

    Hi IAM !

    First of all, you could try adding the following snippet in a MU plugin ( more info about MU plugins is here )

    <?php
    function wpmu_jobs_plus_change_template( $view_path, $view ) {
        if ( 'job-form/main' === $view ) {
            $new_path = get_stylesheet_directory() . '/jobs_plus/job-form/main.php';
    		if ( file_exists( $new_path ) ) {
    			$view_path = $new_path;
    		}
        }
        return $view_path;
    }
    add_filter( 'ig_view_file', 'wpmu_jobs_plus_change_template', 10, 2 );

    It allows you to replace job-form/main template via your current theme instead of making changes directly in the plugin.
    So, now you can use {wordpress_folder}/wp-content/themes/{current_thene}/jobs_plus/job-form/main.php file insted of {wordpress_folder}/wp-content/plugins/jobs-plus/app/views/job-form/main.php template.

    Also, I attached a new template version with the hierarchical sort. So, you should create jobs_plus folder in your current theme folder, then create job-form folder in the jobs_plus folder and then copy the attached main.php file to the job-form folder.

    Best,
    Ivan.