• Is there a way to list jobs in a different order? I would rather not have jobs listed newest post first, but the other way around. This is the code I use to list jobs on my site, but if a shortcode is better, I’m open to using it, obviously.

    <?php if(function_exists('jobs_list')) jobs_list(); ?>

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter ben2358723823567

    (@ben2358723823567)

    OK, I literally just found an answer to my question:

    <?php echo do_shortcode('[job-postings orderby="date" order="ASC"]'); ?>

    Thanks!

    Mike

    (@techiebazaar)

    I am not able to get the jobs listed with the following code.

    [job-postings show_filters=”false” hide_past=”true” orderby=”position_valid_through” order desc]

    position_valid_through is used for the closing date for the applications.

    Could someone please advise if orderby works with this attribute?

    Thread Starter ben2358723823567

    (@ben2358723823567)

    Not sure if it helps, but in my working code it’s order="DESC" not order desc

    Mike

    (@techiebazaar)

    good catch of using ” “.
    However it still did not make any difference in the result.
    I changed from “position_valid_through” to “date” and different values of order, still no change in the list of jobs. They are ordered by order in which they were created.

    https://www.techiebazaar.com.au/current-vacancies/

    Thread Starter ben2358723823567

    (@ben2358723823567)

    I’m not the plugin’s developer, so obviously I cannot help you much. I posted my question and also the answer to my own question, but I know next to nothing about this plugin because I literally just started using it a couple days ago. Your quotes look weird tough. Mines look like this " while yours look like this it’s really not the same quotes the way I see it. Perhaps you could copy/paste my quotes instead? "

    Or just copy/paste exactly these to test on your site?

    [job-postings orderby="date" order="ASC"]

    [job-postings orderby="date" order="DESC"]

    Mike

    (@techiebazaar)

    using ” ” or " are the same.
    I replaced ” with &quot, but it made no difference.
    Hope some techie on this plugin will shed some light.
    thank you.

    Thread Starter ben2358723823567

    (@ben2358723823567)

    If both of these do not change anything, it is clearly not a problem with the plugin, but rather a problem with the theme or most likely a cache issue. If you have WP Cache or any other caching plugin, make sure to DISABLE it before testing, otherwise nothing will change on your frontend site and you will have lost your time!

    These cannot show the jobs in the same order, it’s impossible. So try them one at a time and note how jobs are listed, then try the other line of code:

    [job-postings orderby="date" order="ASC"]

    [job-postings orderby="date" order="DESC"]

    Mike

    (@techiebazaar)

    I updated wp-config.php file and added
    define (‘WP_CACHE’, ‘false’);

    Still there no ordering on this attribute position_valid_through.

    Thread Starter ben2358723823567

    (@ben2358723823567)

    That is not what I suggested to try.

    Mike

    (@techiebazaar)

    I do not have WP Cache or any other caching plugin.
    So how would I disable it?

    Mike

    (@techiebazaar)

    Somewhere I read to use the following code:

    add_filter( ‘jobs/listing_query’, function($args){
    $args[‘orderby’] = ‘valid_through’;
    return $args;
    } );

    But I do not know where do I place this code and how to use it?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to list jobs in a different order?’ is closed to new replies.