Quantcast
Channel: Topic Tag: plugin | WordPress.org
Viewing all articles
Browse latest Browse all 26892

nemad on "[Plugin: The Events Calendar] Widget sort order and styling changes depending on the page it is viewed on"

$
0
0

Hi, I'm trying to set up The Event Calendar widget to show the latest event added rather than the next upcoming event, and I'm using this code in list-widget.php to do it.

...
if ( $posts ) {
	?>
	<ol class="hfeed vcalendar">
		<?php
		$args = array( 'posts_per_page' => 3, 'post_type' => 'tribe_events', 'orderby' => 'post_date', 'order'=> 'DESC');
		$posts = get_posts( $args );
		foreach ( $posts as $post ) :
			setup_postdata( $post );
			?>
...

It works fine on every page EXCEPT the main events page using list view it defaults back to the event date order rather than post date order.

All the other views are fine and all the other event pages are fine too.

I also have a funny styling issue. The following line of the widget...

<li class="tribe-events-list-widget-events hentry vevent type-tribe_events post-167 tribe-clearfix tribe-events-venue-157 tribe-events-organizer-156">

...changes height depending on the page its viewed on, does the widget load different CSS depending on the view of the events page or the page its viewed on?

Thanks for any advice.

https://wordpress.org/plugins/the-events-calendar/


Viewing all articles
Browse latest Browse all 26892

Trending Articles