-
AuthorPosts
-
September 7, 2015 at 12:14 pm #499181
Hi Team,
I want sort my portfolio items from a – z instead chronological. What can I do?
Hope you can help me!Kind Regards
MikeSeptember 7, 2015 at 12:15 pm #499183only for notification – had forgot it ;)
- This reply was modified 9 years, 2 months ago by Mike61.
September 7, 2015 at 5:22 pm #499413Hey!
have a look here: http://kriesi.at/documentation/enfold/change-the-sort-order-of-portfolio-elements/
Best regards,
AndySeptember 7, 2015 at 5:58 pm #499454Hey Andy,
sorry this was my mistake: Not “Portfolio”, what I mean is an categorylisting.
I will be nice when I can do that not for all categorys, I need this for some special
categorys. Hope you can help me again…Kind Regards
MikeSeptember 8, 2015 at 2:09 pm #499875Hey!
Can you please post the link to your category where you would like to apply the changes? :)
Cheers!
YigitSeptember 8, 2015 at 2:45 pm #499889Hi Yigit,
shure, tak a look at the private content ;)
Thank you for your help…Kind Regards
MikeSeptember 8, 2015 at 3:01 pm #499907Hey!
Please try using following plugin – https://wordpress.org/plugins/taxonomy-terms-order/
Cheers!
YigitSeptember 10, 2015 at 6:39 pm #501264Hi Yigit,
mmmh, I found your snippets under http://kriesi.at/documentation/enfold/change-the-sort-order-of-blog-posts-elements/ but they don’t work?!I am looking exact for this functionallity but not for all categorys, I need this filter for *some* categorys. Hope you can help me?!
Regards
MikeSeptember 11, 2015 at 3:19 pm #501688Hey!
that would require a heavy customization of the theme, which would be considered as custom work. You can hire a freelancer for this job here: http://kriesi.at/contact/customization
I would try the plugin Yigit has mentioned.
Cheers!
AndySeptember 11, 2015 at 5:34 pm #501822Andy,
and what is with Link in your Blog? Why this don’t work?
http://kriesi.at/documentation/enfold/change-the-sort-order-of-blog-posts-elements/September 14, 2015 at 3:34 pm #502819Hi!
I tested it and it works fine for me. Are you using a child theme?
Regards,
AndySeptember 14, 2015 at 5:48 pm #502941Hi Andy,
shure, I am using an child theme.
September 15, 2015 at 11:25 am #503206Hey!
This should work:
add_action( 'pre_get_posts', 'pre_get_posts_portfolio' ); function pre_get_posts_portfolio( $query ) { if( $query->is_main_query() && is_tax( 'portfolio_entries', array(40, 42) ) ) { $query->set('orderby', array('meta_value' => 'ASC', 'title' => 'ASC')); } return $query; }
Adjust the id 40 and 42 to the id of the portfolio categories in your installation.
Regards,
IsmaelSeptember 15, 2015 at 11:48 am #503242Hi Ismael,
I don’t know what I do wrong: I wrote at my second post:
“sorry this was my mistake: Not “Portfolio”, what I mean is an categorylisting.” And you guys wrote me all about Portfolio?!ONCE MORE:
I want order some BLOG CATEGORIES from a – z.
Hope you canhelp me!Thank you and regards
Mike- This reply was modified 9 years, 2 months ago by Mike61.
September 16, 2015 at 7:11 am #503818Hey!
Oh OK. I didn’t notice your second post. Did you set the blog style to grid? If that is the case, use this code:
function custom_post_grid_query( $query, $params ) { $query['orderby'] = 'title'; $query['order'] = 'ASC'; return $query; } add_filter( 'avia_post_slide_query', 'custom_post_grid_query', 10, 2);
If you use blog style other than grid, you can follow the solution here: http://kriesi.at/documentation/enfold/change-the-sort-order-of-blog-posts-elements/
EDIT: Add conditional functions (example above: is_tax) if you want the filter to work for specific categories only.
Regards,
IsmaelSeptember 16, 2015 at 8:02 am #503841Hey!
I just realized that the solution above might not work in your installation. Please use this instead:
add_action( 'pre_get_posts', 'pre_get_posts_post' ); function pre_get_posts_post( $query ) { if( $query->is_main_query() && is_category( array(8, 12) ) ) { $query->set('orderby', array('meta_value' => 'ASC', 'title' => 'ASC')); } return $query; }
Again, you can change the ids in the is_category function.
Best regards,
IsmaelSeptember 18, 2015 at 8:59 am #505291Hi Ismael,
that’s it! Thank you for your nice support.
You can close this ticket.Kind Regards
MikeSeptember 21, 2015 at 6:23 am #506218 -
AuthorPosts
- You must be logged in to reply to this topic.