Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1162270

    I have a custom post type “bar”.
    I have a blog grid
    I want to order them Alphabetically

    I added the following code in the functions file:

    add_filter(‘avia_post_slide_query’,’avia_change_grid_order’, 10, 2);
    function avia_change_grid_order($query, $params)
    {
    $query[‘orderby’] = ‘title’;
    $query[‘order’] = ‘ASC’;

    return $query;
    }

    But it does not seem to be working, in fact I am not sure how it is ordering them now.

    I dont really want to add another sorting plugin.

    Page: https://www.gayberlin4u.com/gay-bars-berlin/

    Any advice?

    Keith

    #1163469

    Hey roamingk,

    How are you ordering the bar post type?

    Best regards,
    Basilis

    #1163671

    At the moment I have them set to “display all”. I don’t have any date filter.. and am using the code as mentioned in the previous post. Is there a way to order custom posts in Enfold back end that I am missing?

    #1163856

    Hi roamingk,

    Please have a look at the following thread:
    https://wordpress.stackexchange.com/questions/65494/custom-post-type-order-field

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1164278
    This reply has been marked as private.
    #1164535

    Hi roamingk,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

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