-
AuthorPosts
-
January 6, 2017 at 7:27 pm #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.
January 6, 2017 at 10:02 pm #730531Hi emskrd!
Please take a look here
it is the documentation, let us know if that will work out for you
Best regards,
BasilisJanuary 6, 2017 at 10:34 pm #730548Thank 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.”January 9, 2017 at 11:09 am #731050Hi,
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,
AndyJanuary 11, 2017 at 12:54 am #731795Tried 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….
January 11, 2017 at 9:16 pm #732312Hi,
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,
AndyJanuary 12, 2017 at 1:06 am #732403Done, 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!
January 16, 2017 at 5:08 am #733869Hi,
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,
IsmaelJanuary 18, 2017 at 1:49 am #735067Tried 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, 11 months ago by emskrd.
January 20, 2017 at 8:22 am #736284Hi,
That’s weird, that code should’ve worked properly, can you give us ftp access? so we can check it further.
Best regards,
NikkoJanuary 20, 2017 at 6:08 pm #736602Yes, login is in private content.
January 24, 2017 at 7:08 pm #737893Still waiting on a reply regarding this…. please advise.
January 25, 2017 at 9:27 am #738209Hi,
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,
IsmaelJanuary 25, 2017 at 5:31 pm #738490Here’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.
January 30, 2017 at 11:11 am #740130Hi,
Change the order parameter to “ASC” instead of “DESC”.
// https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
Best regards,
IsmaelJanuary 30, 2017 at 6:34 pm #740340I 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.
MendyJanuary 31, 2017 at 6:20 am #740490Hi!
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!
IsmaelFebruary 1, 2017 at 1:55 am #740959Thanks 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,
MendyFebruary 1, 2017 at 6:26 am #741003Hi!
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!
IsmaelFebruary 2, 2017 at 1:09 am #741509But 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?
February 7, 2017 at 10:16 am #743782Hey!
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,
IsmaelFebruary 13, 2017 at 7:04 am #746142That 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!
February 14, 2017 at 4:54 am #746699Hi,
Great, glad you got it working :-)
Please let us know if you should need any further help on the topic.
Best regards,
RikardJanuary 10, 2018 at 2:13 pm #895671Hallo ,
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.
PetschkaJanuary 11, 2018 at 7:54 am #896016 -
AuthorPosts
- You must be logged in to reply to this topic.