• The output of the my_calendar_today shortcode is automatically wrapped in a UL tag, so it is displayed as a list. We have tried a custom template, but the contents of the template are still automatically wrapped in a UL and LI. Is there a way to change this so that there are no bullets or indents?

    If not, is there a way to configure the my_calendar_upcoming shortcode to only display events for today? The my_calendar_upcoming shortcode displays fine.

Viewing 1 replies (of 1 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    You can change the wrapper using the filters mc_todays_events_header and mc_todays_events_footer.

    Usage:

    add_filter( 'my_todays_events_header', 'my_custom_header' );
    function my_custom_header( $header ) {
        return str_replace( '<ul ', '<div ', $header );
    }
    add_filter( 'my_todays_events_footer', 'my_custom_footer' );
    function my_custom_footer( $footer ) {
        return '</div>';
    }

    The first function uses a str_replace so that the classes & IDs on the opening element will remain intact.

    Alternately, you can add custom CSS to remove the appearance of the list items, e.g.

    .todays-events, .todays-events li {
       list-style-type: none;
       margin: 0;
       padding: 0;
    }

    I have no way of knowing whether the above would work for you, however – your theme styles could easily override it, in which case you’d need to increase the specificity.

Viewing 1 replies (of 1 total)
  • The topic ‘Change output of my_calendar_today’ is closed to new replies.