Forum Replies Created
-
AuthorPosts
-
Jonah
ParticipantHi Karen,
Glad to hear you figured it out. Let us know if you need any other help with things.
Cheers,
JonahJonah
ParticipantHi Damien,
The above code would go into your theme’s functions.php file but it’s only going to work if you already have a page with the calendars setup where you can modify the query with this function. Unfortunately we cannot help out with this level of customization and you will either need to figure it out on your own or hire a developer to work with you.
Good luck!
– Jonah
Jonah
ParticipantHi all,
This is not a bug but more of a conflict of CSS classes. We do have it slated to be fixed in a future release but no guarantees of when it will make it in. If you are noticing this problem in your theme, you basically just need to rename the .previous and .next classes in the plugin CSS and in the single event view to fix it. If anyone has any further questions about this, please let us know.
Thanks,
JonahJonah
ParticipantHi Tyler,
I’m sorry but I do not know why the code is not working when there are no upcoming events. You’ll need to figure out a way to add a conditional check to determine when there are no posts on the page. Good luck!
– Jonah
Jonah
ParticipantHi Damien,
The only thing I can think of off the top of my head to get this to work is by using pre_get_posts to modify the query on page and set an end and start date for a span of two months. Here is an example of using pre_get_posts:
add_action( 'pre_get_posts', 'show_two_months_of_events' );
function show_two_months_of_events( $query ) {
$current_date = date('j M Y', strtotime('1 month ago'));
$end_date = date('j M Y', strtotime('1 month'));if ( $query->query_vars['eventDisplay'] == 'month' && $query->query_vars['post_type'] == TribeEvents::POSTTYPE && !is_tax(TribeEvents::TAXONOMY) && empty( $query->query_vars['suppress_filters'] ) ) {
$query->set('start_date', $current_date);
$query->set('end_date', $end_date);
}
return $query;
}
You might need to modify that a bit. The condition is to only set the query vars on the month view so if you’re displaying this in a page or post you’ll need to change the condition or add your own. Outside of that this is going to be fairly complex to set and we cannot assist with that level of customization. Hopefully this gets you going in the right direction though.Cheers,
JonahJonah
ParticipantHi Karen,
Sorry to hear about this. It could be a conflict with another plugin or with your theme. Can you please try deactivating all other plugins and/or switching to the Twenty Eleven theme to rule out a conflict with either of those two things. Let me know what happens.
Thanks,
JonahJonah
ParticipantHi Emeline,
You might try modifying the query with pre_get_posts. This would go in your functions.php file and should be modified to only be executed on whatever page you are on:
add_action( 'pre_get_posts', 'set_query_to_upcoming' );
function set_query_to_upcoming( $query ) {
if(is_page('your-page-name')) {
$query->set('eventDisplay', 'upcoming');
}
return $query;
}
I hope that helps!
– Jonah
Jonah
ParticipantHey Ramtin,
Glad to hear that worked! Let us know if you need anything else.
– Jonah
Jonah
ParticipantHi Jim,
This scenario certainly sounds like it would max out the system, if not our plugin, WordPress. How did you actually set the recurrence to end after 9999 events? I don’t think we have an option to set how many events to end it after or at least I wasn’t aware of one. You can do a custom recurrence and set it to re-occur every day/week/month/year but that only let’s you set it as far as 2023 in the future…
To clear out the events your best bet is probably to go into phpMyAdmin and run a delete query for all posts of post_type ‘tribe_events’. In the future I would suggest having a db backup so you can easily revert.
I hope that helps and let me know more detail on how you setup the recurrence.
Thanks,
JonahJonah
ParticipantHi Kishore,
To set the date range for the grid view, you can use the start_date/end_date variables in the pre_get_posts function like so:
add_action( 'pre_get_posts', 'exclude_events_category' );
function exclude_events_category( $query ) {
$current_date = date('j M Y', strtotime('1 month ago'));
$end_date = date('j M Y', strtotime('1 month'));if ( $query->query_vars['eventDisplay'] == 'upcoming' || $query->query_vars['eventDisplay'] == 'past' && $query->query_vars['post_type'] == TribeEvents::POSTTYPE && !is_tax(TribeEvents::TAXONOMY) && empty( $query->query_vars['suppress_filters'] ) ) {
$query->set('start_date', $current_date);
$query->set('end_date', $end_date);
}
return $query;
}
I hope that helps!
– Jonah
Jonah
ParticipantHi Kyle,
Can you please post some more information about how/where you are putting the do_shortcode() function? And, can you post an example of your site so I can see it in action?
Thanks,
JonahJonah
ParticipantHi Joseph,
It’s not a folder, it’s a setting that controls which template files used for the main event pages and single events. If this is selected, the plugin will use:
/wp-content/plugins/the-events-calendar/views/ecp-page-template.php (main event pages)
/wp-content/plugins/the-events-calendar/views/ecp-single-template.php (single events)You might want to check out our themer’s guide for more info on this: https://theeventscalendar.com/support/documentation/events-calendar-themers-guide/
I hope that helps!
– Jonah
July 13, 2012 at 2:23 pm in reply to: Events Calendar PRO: bug when using categories and question to dev team #22088Jonah
ParticipantHi Sandro,
Unfortunately we cannot help with this level of customization. You’ll need to either figure it out on your own or hire a developer to help you. Good luck!
– Jonah
Jonah
ParticipantHi Joseph,
In order to do this you need to echo the custom field value in the single event view and wrap it in link HTML like so: https://gist.github.com/2901504
I hope that helps!
– Jonah
Jonah
ParticipantHi Joseph,
It looks like you also inserted that thumbnail into the event content. Have you tried removing it? The plugin automatically insert the event featured image into the tooltip and top of the single event view. If you want to modify what shows up in the single event view, just make a copy of /wp-content/plugins/the-events-calendar/views/single.php, place in an ‘events’ folder in your theme and edit away!
I hope that helps!
– Jonah
-
AuthorPosts
