Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • fiezie92

    (@fiezie92)

    This is my full code and where I pasted it

    <?php echo $args['before_widget'];
    
    if (!empty($instance['title'])) {
    	echo $args['before_title'] . $instance['title'] . $args['after_title'];
    }
    
    do_action('mptt_widget_upcoming_before_content', $events);
    
    $time_format = get_option('time_format');
    
    $events_group_by_categories = array();
    
    foreach ($events as $event) {
    	if (!isset($temp[$event->column_id])) {
    		$events_group_by_categories[$event->column_id][] = $event;
    	} else {
    		$events_group_by_categories[$event->column_id][] = $event;
    	}
    }
    
    if (!empty($events)): ?>
    	<?php foreach ($events_group_by_categories as $key_category => $cat_events) { ?>
    		<ul>
    			<?php foreach ($cat_events as $key => $event):
    				$event_class = 'event';
    				?>
    				<li class="<?php echo apply_filters('mptt_widget_upcoming_event_class', $event_class) ?>">
    					<?php
    
    					$disable_url = (bool)$event->post->timetable_disable_url || (bool)$instance['disable_url'];
    					$url = ($instance['custom_url'] != "") ? $instance['custom_url'] : (($event->post->timetable_custom_url != "") ? $event->post->timetable_custom_url : get_permalink($event->event_id));
    
    					if (!$disable_url) { ?>
    					<a href="<?php echo $url ?>" title="<?php echo get_the_title($event->event_id) ?>" class="event-link">
    						<?php }
    						echo get_the_title($event->event_id);
    						if (!$disable_url) { ?>
    					</a><br/>
    				<?php } ?>
    					<span class="post-date">
    				<?php if ($instance['view_settings'] !== 'today' && $instance['view_settings'] !== 'current'): ?><?php echo get_the_title($event->column_id) ?>
    					<br/>
    				<?php endif; ?>
    						<time datetime="<?php echo $event->event_start; ?>" class="timeslot-start"><?php echo date($time_format, strtotime($event->event_start)); ?></time>
    						<?php echo apply_filters('mptt_timeslot_delimiter', ' - '); ?>
    						<time datetime="<?php echo $event->event_end; ?>" class="timeslot-end"><?php echo date($time_format, strtotime($event->event_end)); ?></time>
    				</span>
    				<span class="event-description"><?php echo $event->description; ?></span>
    				</li>
    			<?php endforeach; ?>
    		</ul>
    		<?php
    	}
    else:
    	_e('no events found', 'mp-timetable');
    endif;
    
    do_action('mptt_widget_upcoming_after_content', $events);
    
    echo $args['after_widget'] ?>
    fiezie92

    (@fiezie92)

    Hi, I already switched from theme to developer default before and it wasn’t working. That’s why I switched. The screenshot I added is a developer option. The file I edited was the one you mentioned above “ \wp-content\plugins\mp-timetable\templates\theme\widget-upcoming-view.php“. No I didn’t override through a child theme. I wanted to see if I could troubleshoot the issue then create a child theme and copy it over. I’ll send a screenshot of where I placed the line of code or copy the code here.

    fiezie92

    (@fiezie92)

    Hi, please I have this same issue. But the description still doesn’t show after adding “<span class=”event-description”><?php echo $event->description; ?></span>“ to the PHP file or am I adding it to the wrong line of code? If so where do I add it in that folder. I’m a bit new to PHP please.

    I’m also having this issue. How can I add cities to shipping zones please. I’ve been searching Google all day for budget friendly options but WooCommerce Table Rate Shipping Pro is the only option I’m seeing so far and the price is waaay out of my existing budget at the moment. Please help guys. I don’t mind if I have to code. I only need the city option for one city at the moment.

Viewing 4 replies - 1 through 4 (of 4 total)