Forum Replies Created
-
AuthorPosts
-
Doug
ParticipantDoug
ParticipantDoug
ParticipantI implemented this code as you suggested and it crashed the site with this error.
Fatal error: Call to undefined function wpv_is_reduced_response() in /home/first1st/public_html/wp-content/themes/church-event/page.php on line 9
I’ve put the default code back for the time being.
February 23, 2015 at 6:58 pm in reply to: make events show on publish date in main blog view #944446Doug
ParticipantI’m trying to get events to post as blog items; in the general news two category on the blog roll by posts date not by events date as stated below.
this is the URL in question http://fumchurch.com/general-news-2/
Order events in main blog loop by post date
Under Events –> Settings –> General, you can set your events to show alongside your posts in the main blog loop on your site. By default, the events are ordered by the event date. This snippet allows you to change that, so events in the main blog loop are ordered by the date they were published.
To do this, paste the following in your theme’s functions.php file. Please note that you may need to clear your cache to see the changes. If you need help using this snippet, feel free to post in our forums.
1
2
3
4
5
6
7add_action( ‘pre_get_posts’, ‘tribe_post_date_ordering’, 51 );
function tribe_post_date_ordering( $query ) {
if ( $query->tribe_is_multi_posttype) {
remove_filter( ‘posts_fields’, array( ‘TribeEventsQuery’, ‘multi_type_posts_fields’ ) );
$query->set( ‘order’, ‘DESC’ );
}
}
DetailsCategories: List View
Level: Intermediate
Products: The Events Calendar
Last Updated: 9.10.14Related Articles
Listing events with your site’s blog posts
Report an issue
Buy Events Calendar Pro
Check out our Ticketing SolutionsFebruary 23, 2015 at 5:48 pm in reply to: make events show on publish date in main blog view #944432 -
AuthorPosts
