Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #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
    Mike

    #499183

    only for notification – had forgot it ;)

    • This reply was modified 9 years, 2 months ago by Mike61.
    #499413
    #499454

    Hey 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
    Mike

    #499875

    Hey!

    Can you please post the link to your category where you would like to apply the changes? :)

    Cheers!
    Yigit

    #499889

    Hi Yigit,

    shure, tak a look at the private content ;)
    Thank you for your help…

    Kind Regards
    Mike

    #499907

    Hey!

    Please try using following plugin – https://wordpress.org/plugins/taxonomy-terms-order/

    Cheers!
    Yigit

    #501264

    Hi 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
    Mike

    #501688

    Hey!

    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!
    Andy

    #501822

    Andy,

    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/

    #502819

    Hi!

    I tested it and it works fine for me. Are you using a child theme?

    Regards,
    Andy

    #502941

    Hi Andy,

    shure, I am using an child theme.

    #503206

    Hey!

    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,
    Ismael

    #503242

    Hi 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.
    #503818

    Hey!

    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,
    Ismael

    #503841

    Hey!

    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,
    Ismael

    #505291

    Hi Ismael,

    that’s it! Thank you for your nice support.
    You can close this ticket.

    Kind Regards
    Mike

    #506218

    Hey!

    Great! Glad we could help. :)

    Best regards,
    Ismael

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