Viewing 25 posts - 1 through 25 (of 25 total)
  • Author
    Posts
  • #730492

    Hi – I have tried to change the order of the way portfolio items show up on my site, and nothing is making any sense. I tried by date (changed the date in each item), by alphabetical order, but the ordering still stays random. Link is in Private content to the page where the items are showing up. Thank you.

    #730531

    Hi emskrd!

    Please take a look here

    it is the documentation, let us know if that will work out for you

    Best regards,
    Basilis

    #730548

    Thank you for the prompt reply.

    That’s the very problem I am having. I read that and it clearly says that by default, it should be in order of date published. However, no amount of changing the dates will reorder the items according to date.

    So without changing anything in php, it should already be sorting by date. Quote:
    “By default the portfolio elements that display a group of portfolio items will show them sorted by date created.”

    #731050

    Hi,

    I noticed that you are using a caching plugin. Would you mind opening your plugin’s settings page and temporarily deactivate the caching of your site? Then please try to clear your browser cache and hard refresh the site (Hold CTRL + SHIFT + RELOAD) to see if that solves the issue.

    Best regards,
    Andy

    #731795

    Tried that. If that were to fix it, then either the first item or the last item should be the 8’x10′ product, since that one is the earliest dated portfolio item. But the product is still stuck in the middle of the pack, which makes no sense at all….

    #732312

    Hi,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    Login credentials include:

    • The URL to the login screen.
    • A valid username (with full administration capabilities).
    • As well as a password for that username.
    • permission to deactivate plugins if necessary.

    Best regards,
    Andy

    #732403

    Done, it’s in the private content.

    By the way — I’d like to add a color button around the “Get A Quote” menu item in the top header — can you please tell me how to do that?

    Thanks for your help!

    #733869

    Hi,

    Please add this in the functions.php file.

    //portfolio query
    add_filter( 'avia_post_grid_query', 'avia_post_grid_query_mod', 10, 2);
    function avia_post_grid_query_mod( $query, $params ) {
    	$query['orderby'] = 'date';
            $query['order'] = 'DESC';
    	return $query;
    }

    Adjust the value as needed.

    // https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    Best regards,
    Ismael

    #735067

    Tried that, and it totally crashed my site: http://imgur.com/a/BUTSz

    Luckily I was able to remove that piece of code from File Manager in Cpanel.

    Now what?

    • This reply was modified 7 years, 10 months ago by emskrd.
    #736284

    Hi,

    That’s weird, that code should’ve worked properly, can you give us ftp access? so we can check it further.

    Best regards,
    Nikko

    #736602

    Yes, login is in private content.

    #737893

    Still waiting on a reply regarding this…. please advise.

    #738209

    Hi,

    Did you copy the code from your email? Please copy the snippets directly from this forum. Anyway, we added the code in the functions.php file and it doesn’t cause any issue. Please remove browser cache before checking the page.

    Best regards,
    Ismael

    #738490

    Here’s how it shows up for me: http://imgur.com/a/DAcST

    The page is open in an incognito tab, so no cache interference and the 8’x10′ is still in the middle.

    Look at the other screenshot, you’ll see that the oldest date portfolio item is the 8’x10′. So it should be at the beginning of the items or at the end.

    #740130

    Hi,

    Change the order parameter to “ASC” instead of “DESC”.

    // https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    Best regards,
    Ismael

    #740340

    I made these changes in functions.php. Still not working. I tried in an incognito window.

    I am disappointed with the customer service. I paid for customer service, and it took you 5 days to reply to my question. If this problem is too difficult for you to solve, at least reply within a a day or two.

    At any rate, that option still did not fix the issue. If you have another fix, can you try it yourself before emailing me so we can eliminate this back and forth? That way you can just solve it, and you’ll see when the fix is not working yourself without having to keep messaging me to try it and then get back to you.

    I have put all the login info you need in the Private Content again.

    Thank you.
    Mendy

    #740490

    Hi!

    We are very sorry for the late response. We modified the code in the functions.php file and it did change the order of the items but I’m not sure if that’s what you want. Please adjust the value of the “order” parameter as you see fit.

    Cheers!
    Ismael

    #740959

    Thanks for setting it up. It’s better now, but the second row is not following the smallest to largest order.

    Here’s what I’m trying to achieve:

    The items show up in LOWEST to HIGHEST price, the first item being the lowest, and proceeding to the highest cost. So the first item on the left in the second column should be the 10 ‘x 15’ backdrop.

    The one with no price should be the very last item on the page.

    Once you’ve set it up, can you please let me know what you did so I can know for the future?

    Thanks,
    Mendy

    #741003

    Hi!

    I’m sorry but the items can only be sorted by the date the posts was published. If you want to sort it manually, you can try this plugin.

    // https://wordpress.org/plugins/post-types-order/

    Please note that this plugin can cause issues with the post navigation.

    Once you’ve set it up, can you please let me know what you did so I can know for the future?

    The filter is located in the functions.php file.

    Cheers!
    Ismael

    #741509

    But the date published is EXACTLY how I am trying to order them.

    For instance: If I make the $375 package dated 2/2/17, and the $572 package dated 2/1/17, and the $745 package dated 1/27/17, then the $572 package should show up before the $745 package.

    And yet, the items don’t show in order of date.

    Do you see what I’m saying?

    #743782

    Hey!

    Are you editing the date? If you are editing the date, you need to set the “orderby” parameter to “modified” instead of “date”.

    https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    Please post the expected order of the items so that we can set them accordingly. Did you try the plugin that we suggested above?

    Best regards,
    Ismael

    #746142

    That fixed it! I just edited the last one first, and then the rest in order it now shows in order of last modified. Thank you for your help!

    #746699

    Hi,

    Great, glad you got it working :-)

    Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

    #895671

    Hallo ,

    i got the same problem, tried this code:

    //portfolio query
    add_filter( ‘avia_post_grid_query’, ‘avia_post_grid_query_mod’, 10, 2);
    function avia_post_grid_query_mod( $query, $params ) {
    $query[‘orderby’] = ‘date’;
    $query[‘order’] = ‘DESC’;
    return $query;
    }

    but nothing happened.

    Thanks.
    Petschka

    #896016

    Hi,


    @petschka
    : Please create a new thread or post with the page url and login credentials. We’ll check it there.

    Best regards,
    Ismael

Viewing 25 posts - 1 through 25 (of 25 total)
  • You must be logged in to reply to this topic.