Okay
  Public Ticket #3019516
Sorting events list in backend
Closed

Comments

  •  5
    joshivince started the conversation

    Dear Zhivko,

    I hope you are not upset by those much tickets I create. I hope others can also benefit from my questions.

    Nevertheless I have one last question (for now and for longer, I hope):

    In the backend at Wordpress Admin > STEC > Events I need the list sorted by events that still have to be approved by me ("Waiting for approval" - see screenshot). Those pending events have to be on top of that list. Background is that I have a very huge list already and I want to avoid overlooking some entries.

    Thanks,

    Vincent

    (And I forgot to ask again in the Font Awesome ticket how to delete some of them - e.g. I want to delete the squares as they are disturbing me)

  •  894
    Zhivko replied

    No worries. 

    Try out this hook:

    add_filter('stec_get_admin_events_params', function ($params) {
        $params['query']['meta_query'] = array(
            'approved' => array(
                'key' => 'approved',
                'compare' => 'EXISTS'
            )    
        );     $params['query']['orderby'] = array(
            'meta_key' => 'DESC',
            'approved' => 'ASC'
        );     return $params; });



    Stachethemes Developer

  •  5
    joshivince replied

    Yes, thank you. This hook did also worked.

    And as you don't want to reply my question with the FA icons, you can close this ticket also.

    Thanks,
    Vincent

  •  894
    Zhivko replied

    About the icons - unfortunately it's not very easy. We'll address this in next version.

    What you could do is to add your custom icons via a hook.

    Example:

    update_option('stec_user_fa_icons', array(
               'fab fa-twitch'   => esc_html__('Twitch Logo', 'stec'),
               'fab fa-twitter'  => esc_html__('Twitter Logo', 'stec'),            // etc...
               // etc... ), false);

    Once the changes take effect you can remove this code from functions.php file.


    Stachethemes Developer

  •  5
    joshivince replied

    Hi Zhivko,

    I'm not sure if I understood right. What exactly does the code do?

    Regards,
    Vincent

  •  894
    Zhivko replied

    This code adds all the extra icons you need. 

    Instead of adding them via the back-end one by one risking a typo you can add them all at once.


    Stachethemes Developer

  •  5
    joshivince replied

    I understand, thank you.

    Then you can close this topic also.

    Again, thank you a very lot for your kind and patiently support!

    Vincent from Germany.