Okay
  Public Ticket #1812279
Event Date instead of Icon in calendar by default
Closed

Comments

  • Richard started the conversation

    Is it possible to make a calendar show the event date by default please, rather than any icons or a blank coloured square? Would be great to have this set in the calendar rather than having to set in each event when there's hundreds of events I want to apply this to.

    Thanks

  •  779
    Zhivko replied

    Hi,

    Open yout theme functions.php file and add following filter:

    add_filter('stec_insert_post', function($data){
        $data['meta_input']['icon_type'] = 'date';
        return $data;
    });

    Now when you save/update your events the icon type always will be set to "date" regardless of the admin setting.


    Stachethemes Developer

  • Richard replied

    Thanks for the reply, but to confirm, I've added this to my child theme but it's not worked. Does that need adding to the parent theme? If so, then I'd be worried it got overwritten next time I update my parent theme.

    Thanks

  •   Richard replied privately
  •  779
    Zhivko replied

    You can place it in your child theme.

    Remove the previous code I've sent you earlier and place this one instead:

    add_filter('stec_event_get_front_data', function($data) {
        $data['icon_type'] = 'date';
        return $data;
    });

    Stachethemes Developer

  •   Richard replied privately