Tagged: portfolio grid
-
AuthorPosts
-
September 27, 2018 at 9:27 am #1015191
Hi!
I have added a date custom field to the portfolio item and I’d like to add that attribute to the “order by” option on the portfolio grid. Can you point me in the right directions?
Was looking to other support request and found this link in a few of them: http://kriesi.at/documentation/enfold/how-to-add-an-orderorderby-option-to-the-blogpost-sliderportfoliomasonry-grid-element/. But the link redirects to a different section of the documentation now.
Thanks
September 28, 2018 at 12:14 am #1015547Hey koen_dieren,
Yes, that is the updated documentation :)
If you do scroll there, you can see all the details!Let us know if that will work for you.
Best regards,
BasilisSeptember 28, 2018 at 3:06 am #1015569Does not work mate.
That links to documentation about contact forms not about “order by” options for the portfolio grid.
September 28, 2018 at 8:37 am #1015617Hi,
Please add this code to 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; }and adjust the value(s).
https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
Best regards,
PeterOctober 2, 2018 at 4:13 am #1016839Hi Dude,
Not working for me, can you check the function or have a look in the backend?
October 4, 2018 at 3:50 am #1017654Hi,
The “order” and “orderby” settings are already available in the Portfolio Grid panel. Just scroll at the very bottom of the element’s panel. Do you need to sort your portfolio items based on the custom field? Try to use the “avia_post_grid_query” filter to adjust the “orderby” parameter. It should be set to “meta_value”.
// https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.
