WordPress.org

Ready to get started?Download WordPress

Forums

My Calendar
Easy way to add class around each widget item e.g. {title} (2 posts)

  1. cheeseslice
    Member
    Posted 3 years ago #

    Hello all,

    I have just installed my-calendar and I am very impressed with it.

    For what I need I think I have to hardcode the 'upcoming events' shortcode into my widget theme as I want to use css to customise the look of each individual item of information i.e. Date, time and title.

    Is there an easy way to wrap each of these items in their own class? I was having a look through 'my-calendar-output.php' but I can't quite see where I need to change the code.

    Is it possible to have the list output the events for each day without repeating the date if there are multiple events on a day?

    Thanks in advance

  2. Joe Dolson
    Member
    Plugin Author

    Posted 3 years ago #

    Adding classes around each item in the upcoming events is done in the template attribute. The upcoming events output is templated on the event level; so a simple example template might be

    <span class='title'>{link_title}</span>: <strong>{date}</strong>

    You can't, however, avoid repeating the date using the upcoming events output.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic