Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1438439

    Hi,
    i had a CODE to sort posts per drag and drop in the backend. it was working perfect. Now there came an error when i was working on the page, it said database error, the page was white, didnt load anymore for a moment, was back after a while but the sorting didnt work anymore. It was like it normally is.
    But i need to have the dates beginning by january and ending in december instead of the other way around.
    The normal plugin to drag and drop in the backend wasn`t working.
    You have any idea what i can do? I really need to do it that way.

    Many regards rixi

    <?php
    /* Child theme stylesheet einbinden */
    function child_theme_styles()
    {
    wp_enqueue_style(‘parent-style’, get_template_directory_uri() . ‘/style.css’);
    wp_enqueue_style(‘child-theme-css’, get_stylesheet_directory_uri() . ‘/style.css’, array(‘parent-style’));
    }
    add_action(‘wp_enqueue_scripts’, ‘child_theme_styles’);

    /** adjust the magazine element query **/
    function avf_magazine_entries_query_mod($query, $params)
    {

    if (is_page(817)) {

    $query[‘order’] = ‘ASC’;

    $query[‘orderby’] = ‘menu_order’;
    }

    return $query;
    }

    add_filter(‘avf_magazine_entries_query’, ‘avf_magazine_entries_query_mod’, 10, 2);

    #1438777

    Hey rixi,
    Thank you for your patience, the page that you linked to has the page ID of 1842, but your function above wil only work on 817 try adjusting.
    I tested your function on my test page and it worked correctly
    Enfold_Support_5227.jpeg

    Best regards,
    Mike

    #1438831

    Hello Mike,
    i am sooooo glad that you found that out – thank you very much, that made my easterday!!!!!
    I changed it now and it works perfect :)

    Have a great eastertime and thanks again.

    This enfold support team is absolutely perfect :)

    Best regards
    rixi

    #1438835

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘sorting posts’ is closed to new replies.