Florian

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: mark an event as full and show that frontend #1233697
    Florian
    Participant

    Thank you Geoff for your help!

    We’ve done it with the event image (which works fine for us).

    (However your solution would be more elegant…)

    in reply to: Change the sequence of numbers #1233694
    Florian
    Participant

    Thx Nico, it’s working now.

    Steps I’ve done

    1. I’ve put this code in the theme’s “functions.php”:

    /*
     * The Events Calendar - Change filter values order
    */
    add_filter( 'tribe_events_filter_values', 'tribe_re_order_filter_tags', 10, 2 );
    function tribe_re_order_filter_tags ( $values , $slug ){
    	
    	if ( $slug == '_ecp_custom_2' ) {
    		sort($values); // a-z
    	}
    	
    	return $values;
    }

    2. To figure out what to fill in for “_ecp_custom_2” (field key):
    Events >> Help >> @ Systeminformation I found the snippet:

    [10] => Array
            (
                [name] => _ecp_custom_10
                [label] => Alter
                [type] => checkbox
                [values] =>  5

    => _ecp_custom_10 is the neccesary field key (in my case)

    Just for (my) interest:

    http://php.net/manual/en/array.sorting.php <– are these the options to sort the values of the custom field?

Viewing 2 posts - 1 through 2 (of 2 total)