Forum Replies Created
-
AuthorPosts
-
Simon
ParticipantThanks Geoff. That looks very promising : )
December 3, 2015 at 8:47 pm in reply to: Showing full content, not limited content (auto excerpt) after update to 4.0 #1035204Simon
ParticipantThanks Barry and Gustavo. Client is happy : )
Simon
ParticipantThanks so much Barry. I think that did the trick!
I’ll leave this open for a few hours whilst the client tests the site to see if all is ok.
If so, I’ll close the ticket.
Thanks again!Simon
ParticipantIf my callback is running for all queries, then why not the AJAX queries?
How would additional testing help it apply to AJAX queries?Simon
ParticipantHi Barry,
I don’t know the inner workings of those queries.
I literally got the code from this support thread.
It’s a snippet provided by Geoff from support.Simon
ParticipantI should mention that the default List view works.
It doesn’t work if you click Previous or Next.
After clicking Previous or Next, reloading the page works.
So there’s probably something not right with $past_ajax.Simon
ParticipantHi George,
I ran out of time and simply flipped the order of events, most recent at the top, by cobbling together this function:
function tribe_past_reverse_chronological ($post_object) { if( tribe_is_past() || tribe_is_upcoming() && !is_tax() ) { $post_object = array_reverse($post_object); } return $post_object; } add_filter('the_posts', 'tribe_past_reverse_chronological', 100);They are happy with it, so I’m marking this as resolved.
Thanks so much for your help : )Kind regards,
SimonSimon
ParticipantHi George,
Ok, finally got around to trying it. Using your code I made a page template in Genesis which lists events in published order: http://simonbarnett.co.za/artthrobtests/artthrob-events-2/
It works in terms of the order, but do you have a more complete template that displays the events in the same way that the plugin displays them in list view?
As far as I understand it the plugin builds the loop using template parts which are probably not available to normal page templates at that point of code execution, so I’d either need:
A more complete page template, if you perhaps have one
– or –
A way of doing this with a plugin templateI can probably reconstruct a page template, but I just thought it best to ask to save time, so if you don’t have one, then don’t stress : )
Regards,
SimonSimon
ParticipantHey George,
Thanks so much for looking into it : )
Since most of that site is built with custom templates I think your idea of simply building another loop is great. I’ll look at your gist and do a few tests and report back here. Will leave the thread open for now.
Thanks again!
SimonSimon
ParticipantHi George,
No worries : ) Luckily this is one of many items on my task list for this client.
It’s the view on this page ie. list view.
I think that snippet is for a different loop.
Thanks,
SimonSimon
ParticipantHi,
Is there something to add to functions.php to make events appear in the order in which they were published?
Many thanks
Simon
ParticipantAny news?
February 23, 2015 at 12:36 pm in reply to: Calendar sidebar on events pages without using template (Genesis) #944378Simon
ParticipantI eventually did it with a template. In case anyone else asks, when using Genesis, a better default-template.php is as follows:
<?php if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action('genesis_loop','genesis_tribe'); function genesis_tribe() { ?> <div id="tribe-events-pg-template"><?php tribe_events_before_html(); tribe_get_view(); tribe_events_after_html(); ?> </div><?php } genesis(); ?> -
AuthorPosts
