Forum Replies Created
-
AuthorPosts
-
April 3, 2015 at 8:24 am in reply to: Modifications to event listing page (single-event.php) #953061MatthewMember
As outlined in our forum guidelines, we aren’t able to help with these kinds of customizations (specifically your first item). But we do have some handy resources that might be helpful for you:
- Themer’s Guide – provides an overview of how to customize the plugin’s frontend appearance.
- Tutorials – useful tips and tricks for changing how the plugin looks and behaves.
- Technical Docs – provides an overview of the classes and functions in each plugin
- The WordPress function has_tag() – allows you to detect if a given post has a specific tag (which may be useful when testing if an event is a Seminar or a Teacher Training!
For item #2 specifically: since the link would be different for each event, using the tribe_events_after_the_content filter would require some specific customizations to make the links (or buttons) appear there. If you are unable to make that modification and do not know someone whom you can hire, have no fear! We actually keep a list of freelancers who are quite capable of making changes on your behalf. You can obtain this list by emailing [email protected] and requesting it.
Good luck, and thanks for using The Events Calendar!
MatthewMemberI’m glad that worked for you. We will keep that fix on the radar, for sure! I’m going to close out this ticket but if you have any other questions, don’t hesitate to start a new topic!
MatthewMemberWoo hoo! Glad to hear that the solution worked for you! I’ll go ahead and close out this ticket for you. If you come up with any more questions, feel free to post a new topic on the forums!
MatthewMemberHowdy Eric – excellent question!
I liked this question because I had to dig a little to find an answer! While the solution that I have for you is technical, I think it might be useful 🙂 The list/day/month pages all output their content with a function called tribe_get_template_part() like so:
- tribe_get_template_part( ‘list/content’ )
- tribe_get_template_part( ‘day/content’ )
- tribe_get_template_part( ‘month/content’ )
For more information on where those lines can be found, you can check out our Themer’s Guide. Well, those function calls output the events on the list/day/month pages respectively. We have a super handy hook that allows you to change what is output! This is great news because you can change it to an “I’m sorry, you don’t have access.” message or something if the user isn’t an administrator 🙂 Here’s an example of how to do that for all of those views:
function my_event_content_access_restriction( $html, $template, $file, $slug, $name ) { $slugs_to_filter = array( 'list/content', 'day/content', 'month/content', ); if ( ! in_array( $slug, $slugs_to_filter ) ) { return $html; } if ( current_user_can( 'manage_options' ) ) { return $html; } return "<div>I'm sorry, you don't have access to view these events!</div>"; } add_filter( 'tribe_get_template_part_content', 'my_event_content_access_restriction', 10, 5 );
You would drop that right in your theme’s functions.php file. Here’s some helpful info about this solution:
- WordPress documentation on functions.php
- PHP documentation on in_array
- WordPress documentation on current_user_can
Let me know how it goes! 🙂
April 2, 2015 at 6:34 am in reply to: How to hide the administrator name as organizer in the event creation form #952748MatthewMemberI’m very glad you worked through that error! When I copy/paste that into my theme it works fine, however, every installation is a bit different. Here’s a snippet of code that avoids errors a bit better:
function my_organizer_dropdown_remover() { if ( is_admin() ) { return; } if ( ! class_exists( 'Tribe__Events__Events' ) ) { return; } remove_filter( 'tribe_organizer_table_top', array( Tribe__Events__Events::instance(), 'displayEventOrganizerDropdown' ) ); } add_action( 'init', 'my_organizer_dropdown_remover' );
Hopefully that will send you in a better direction! 🙂
MatthewMemberOh, that’s interesting! When I add that CSS directly to the browser via the inspector, it works as expected:
I took a peek at your CSS and it appears as if the CSS that you added at the bottom of the file is commented out (there isn’t a closing */). Was that intended?
/* Tim's stuff /* fix for href link in event listing, to force line break inside container. .tribe-events-meta-group-organizer .url a { word-wrap: break-word !important; }
Can you give the following a try instead?
/* Tim's stuff */ /* fix for href link in event listing, to force line break inside container. */ .tribe-events-meta-group-organizer .url a { word-wrap: break-word; }
Do you get better results with that small tweak?
MatthewMemberNo worries 🙂 Another great question!
Our Events Calendar Pro plugin does supports translations to a number of languages including Spanish! Once Events Calendar Pro is installed, it uses whichever language that WordPress has selected. We have a useful post about our language support in our knowledgebase!
MatthewMemberI have never used Essential Grid…it looks like an awesome plugin! Sorry I don’t have more insight into implementation with it.
As for the code, you should be able to place that in a function in functions.php, perhaps like so:
// obviously rename this function to something that suits you :) function my_sweet_event_dates( $event_id ) { // 'ga' outputs the time in 12-hour time with am/pm after it echo tribe_get_start_date( $event_id, TRUE, 'ga' ) . ' - ' . tribe_get_end_date( $event_id, TRUE, 'ga' ); }
The tribe_get_start_date() and tribe_get_end_date() functions are awesome for shortening that date, plus you can output both the date and times.
Hopefully that helps!
MatthewMemberThe theme that you bought most likely comes with the free version – Events Pro is an add-on that adds some cool features.
Each of our plugins – both the free core plugin as well as our paid add-ons – allow for customization! The Themer’s Guide has a section called Views & Templates where it lists the various customizable pieces for each plugin.
When you make something really cool, be sure to let us know! We always love to feature new and awesome customizations in our Showcase 🙂
MatthewMemberHi Jose – great question!
I agree with you – North Pointe did a great job customizing their event appearances! As you are probably already aware, that look isn’t a default appearance provided by our plugins. The good news is that we try our hardest to make events and calendars very customizable! 🙂 We have some excellent information in our Themer’s Guide that should get you pointed in the right direction.
I hope this helps get you where you need to be!
MatthewMemberHowdy Tim – great question!
You are right, overlapping links don’t help anybody 🙂 Here’s a bit of CSS that should do the trick:
.tribe-events-meta-group-organizer .url a { word-wrap: break-word; }
Drop that in your theme’s CSS file and let me know if that works for you!
April 1, 2015 at 6:53 am in reply to: How to hide the administrator name as organizer in the event creation form #952509MatthewMemberOh yikes! I’ve downloaded the same theme you are using: smartline-lite so that I can see what the full file looks like. I think I would need to see more of the file to know what the problem is. Just so I can take a quick peek and maybe get you back up and running quicker, can you copy/paste the whole file into https://gist.github.com/ and share the link with me? (NOTE: if there’s any private data that you’ve placed in the file, remove that before posting).
Hopefully we’ll get you up and running soon!
March 31, 2015 at 7:33 pm in reply to: Venue Upcoming Events being overridden by Reoccurring Events #952426MatthewMemberThat’s excellent news! I am going to go ahead and close this ticket, but if you need help with anything else please feel free to post a new ticket!
Thanks!
March 31, 2015 at 11:42 am in reply to: Recurring Events – List View – Showing Outdated Events #952313MatthewMemberNo problem! 🙂
That little snippet of code just gives you an array of events and, as you indicated from your tests, it won’t replace the whole block of code. It will, however, allow you to simplify some things! Since the provided code is fairly custom, I hesitate to detail out changes as I wouldn’t want to make assumptions that were inappropriate to your use case. That being said, I can point you to a few things that may be of use as you rework the code!
- print_r can be used to see what information is returned by the snippet that I provided. Try print_r( $events );
- Rather than the “while” loop that is in place in the code, I would suggest using foreach.
- If you do go with foreach, you shouldn’t need to do the $event = null; that I see in the block of code.
I hope this points you in the right direction!
MatthewMemberHowdy Spencer – great question!
The times for an event are stored along with the dates, so the meta keys that hold that information are _EventStartDate and _EventEndDate. However, there are a couple of handy functions that will allow you to easily display the date/time in whichever format best suits your needs! Check out tribe_get_start_date() and tribe_get_end_date() – both use PHP date formatting.
// 'ga' outputs the time in 12-hour time with am/pm after it echo tribe_get_start_date( $event_id, TRUE, 'ga' ) . ' - ' . tribe_get_end_date( $event_id, TRUE, 'ga' );
Does that point you in the right direction?
-
AuthorPosts