I’ve seen this question before somewhere… We sort by menu order so this would require customisation to set this based on the chosen package π
> Also, is it possible to make the map work with gps coordinates instead of addresses?
The map uses geolocation latitude and longitude based on the input address. Astoundify have a map plugin if you want something more ‘specific’.
Thread Starter
MESS10
(@mess10)
Thanks Mike, we fixed the coordinates issue thank you.
I suppose it would have to be some sort of order by setting, in what way is the package attached to the listing? In other words, what attribute?
Thread Starter
MESS10
(@mess10)
I see each post has a meta value _wcpl_jmfe_product_id that contains the id of the product. But if I go to wp-job-manager-functions.php and change the order by to _wcpl_jmfe_product_id it doesn’t make any difference.
I would greatly appreciate if you can point me in the right direction.
wp_wcpl_user_packages is from field editor.
_package_id I believe is the one I set.
Thread Starter
MESS10
(@mess10)
Hi Mike,
Thank you but I still can’t seem to get it to work properly.
I changed the code to the following in wp-job-manager-functions.php
$args = wp_parse_args( $args, array(
'search_location' => '',
'search_keywords' => '',
'search_categories' => array(),
'job_types' => array(),
'offset' => 0,
'posts_per_page' => 20,
'orderby' => '_package_id',
'order' => 'DESC',
'featured' => null,
'filled' => null,
'min_salary' => '',
'max_salary' => '',
'comapny_activities' => '',
'comapny_facilities' => '',
'fields' => 'all'
) );
Am I missing something?
Although something similar to the above would sort by ID, thats not what I was suggesting.
I was suggesting using CUSTOM CODE to set MENU_ORDER based on _package_id once a listing is posted. menu_order is used for sorting by default.
Thread Starter
MESS10
(@mess10)
Sorry for being daft here, but is that a post meta value I need to set? I had a look and currently there is no meta value for MENU_ORDER for any listings. I can create one, but will listings then know to be ordered according to that?
Or where do I set the MENU_ORDER value?
Look in the ‘posts’ table – it is not meta. Its a column.
Thread Starter
MESS10
(@mess10)
Awesome thanks Mike, I seem to have it working correctly
please let me know where to set the MENU_ORDER value and unable to sort the listings to be ordered by the package, in which file i have to change?
Sorting job listing is a easy fix.
Hey, I tried sorting my job listings for hours – without finding a working solution. Could you explain how you solved it?
I use a plugin to set the menu_order of each job listing. The jobs are sorted by menu order in the wordpress backend, but in the job-list from the shortcode it does not work properly.
Hey jannnik ..
Have You resolved sorting issue or not ?
Hey, I still have problems: The jobs are sorted, but it looks like job manager caches the specific query.
I can change the order in the backend and the new order is visible in the backend list. But the new order is not visible in the frontend until I modify the shortcode a bit…
Hey Jannik
Hope this will fix your issue.
Go the wp-job-manager plugin
Open wp-job-manager-functions.php file .
and search for
if ( ‘featured’ === $args[‘orderby’] )
by-default order is according to date (descending)
‘date’ => ‘DESC’
just comment this line and write
‘name’ =>’ASC’