Forums

Events Manager
[resolved] Truncate Calendar Item Titles (2 posts)

  1. hungree
    Member
    Posted 1 year ago #

    Hello,

    I have an issue where I have multiple events on one day. On the calendar things get a bit smushed and ugly. I would like to do two things:

    1. Truncate the number of characters shown for the event. Here I would think I would modify this: " title="<?php echo esc_attr($cell_data['link_title']); ?>"><?php echo date('j',$cell_data['date']); ?>

    2. Make it so it only shows 1 event then a read more.. link. I see the option for this in the backend options but when I set to 1 no matter what it shows 2 events. I only want 1 to show. I tried adjusting this: if( get_option('dbem_display_calendar_events_limit') ){
    $count = 0;
    foreach($cell_data['events'] as $cell_event){
    $cell_events[] = $cell_event;
    $count++;
    if($count > get_option('dbem_display_calendar_events_limit')) break;
    }
    BUT then I lose the More link. Any direction would be greatly appreciated.

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

    try to use the following snippet.

    if($count >= get_option('dbem_display_calendar_events_limit')) break;
    <?php if( count($cell_events) >= get_option('dbem_display_calendar_events_limit',3)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic