Viewing 6 replies - 1 through 6 (of 6 total)
  • Did you ever figure this out? I’m wondering about the same thing. By date isn’t working.

    *bump* There is an order field in the post-items, but it seems to ignore that completely. Need a fix for this please.

    To modify the post order, use pre_get_posts

    This goes in your functions.php

    /**
    *
    * Modify Portfolio Posts Order for Archive
    *
    */
    add_action( ‘pre_get_posts’, ‘jmd_portfolio_query’ );
    function jmd_portfolio_query( $query ) {

    if( $query->is_main_query() && !is_admin() && ( is_post_type_archive( ‘portfolio’ ) || is_tax( ‘portfolio-type’ ) ) ) {
    $query->set( ‘orderby’, ‘menu_order’ );
    $query->set( ‘order’, ‘ASC’ );
    }

    }

    I added what you suggested, @jamesdesign but it did not solve the ordering problem. Am I doing something wrong?

    Hey, folks! Change the time the item was created! Go to Portfolio Items, find the most recent item you’ve created and take note of that time (found by selecting “Quick Edit” and looking at the date row). Whichever item you wish to show first, select Quick Edit and change the time to be the more recent than the last submitted item.

    I went through and changed the times of all of my items starting with 1:59 for the item I wished to show first. I then gave the next item the time of 1:58, 3rd item 1:57… I continued this and have everything in the order I want. This most likely isn’t a reliable fix but for now it is working for me.

    Hi..seems when I paste code here it does not get pasted correctly… so if you copied the above, it’ll throw an error…

    I’ve added it on Github, link below tested and working.

    https://gist.github.com/jamiemitchell/7a17c251b62a5721465b8c25a4c05381

    • This reply was modified 7 years, 3 months ago by jamesdesign. Reason: Code not pasted correctly
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘change order of portfolio items, how?’ is closed to new replies.