Forum Replies Created
-
AuthorPosts
-
Barry
MemberHi – I’m sorry you’re facing difficulties.
So to confirm, this is only a problem with this particular theme? If so, can you tell me what theme you are using and provide a URL so we can see the problem first hand?
Thanks!
Barry
MemberHi – sorry you’re facing difficulties here.
We can certainly leave this open in case other members of the community are able to chime in, but I think some further steps worth taking would be setting up a test product (unrelated to events/ticketing) and see if the same thing happens there.
If so, contacting the team behind WooCommerce is probably worthwhile as this technique really relates to WooCommerce itself and is sourced from their own documentation.
I hope that helps π
May 14, 2014 at 8:59 am in reply to: How to show Previous Events if there are no Upcoming Events #160904Barry
MemberHi! Could you check the result to see if any posts were retrieved first time round ($all_events->have_posts() or else check the post_count property) then if it is apparent nothing was retrieved, run a new query but set eventDisplay to past?
Barry
MemberHmm, yep I see that.
It’s not impossible that this is a problem with your theme (it looks like you are using Espresso which comes pre-bundled with customized event templates) so there are two avenues we could follow initially.
The first is to contact the Espresso authors – I understand they built the theme with The Events Calendar compatibility in mind so they might be interested in looking into this further.
The other is to try (temporarily) renaming the following directory:
themes/espresso/tribe-eventsTo something like:
themes/espresso/ignore-tribe-eventsThis will undoubtedly change the appearance of your event pages, but it would also allow you to confirm if the problem is indeed related to the custom event templates that ship with your theme. Similarly, switching to a default theme like Twenty Thirteen and seeing if the same thing manifests itself there is a good way of checking out this theory.
Let me know how you get on!
Barry
MemberHi!
1. Is there a way I can put a link on the Calendar Events page that links to βsubmit you eventβ and goes to the community add event page?
Definitely. You could customize the relevant templates (see our Themer’s Guide to learn about doing this safely) or you could use a hook and add a snippet to your theme’s functions.php file, something like this:
add_filter( 'tribe_events_before_html', 'community_submission_link' ); function community_submission_link( $html ) { if ( tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) return $html; $link = '<a href="/events/community/add/"> Submit an event! </a>'; return $html . $link; }2. If there a way I can get the calendar widget to appear the community add event page? Currently I do not think my page templates are setup to require sidebars so I think that is my main problem?
That could certainly be the reason. You could potentially edit your page template (if that’s what you are using) and add a sidebar, though, and could even do so conditionally so it only appears on the submission page – something like:
if ( tribe_is_community_edit_event_page() ) get_sidebar();I hope that helps π
Barry
MemberHi!
Thanks for sharing that info.
I’m not sure I see the problem, though – can you point me to a specific example? I did find a recurring event (I won’t post the name here in case it’s sensitive, but running monthly from May 15 – December 18) and clicked through to the June and November instances and the date displayed as expected.
Can you clarify/is the issue resolved?
Barry
MemberAwesome!
I’ll go ahead and close the thread. As an aside, though, if you have a moment and wanted to share your thoughts/experiences on The Events Calendar over on our review page we’d love to hear from you π
Barry
MemberExcellent!
Barry
MemberHi Cliff,
Thanks for sharing that snippet – unfortunately it doesn’t really give me a sense of where your save handler comes in to play though (unless I’m missing something) and that is likely to be where the problem is.
I appreciate that, but itβs most definitely a bug with ECP, interfering with a very simple, common customization.
I’m not sure I agree. Here’s some sample code I knocked up that simply adds a meta box containing a text input (and of course handles saving it – excuse for the moment the lack of safety checks). I don’t really see a problem in terms of adding a meta box and saving the data:
add_action( 'add_meta_boxes', 'add_event_meta_box' ); add_action( 'save_post', 'custom_field_save_handler' ); function custom_field_save_handler() { if ( ! isset( $_POST['test_field'] ) ) return; update_post_meta( get_the_ID(), '_meta_box_custom_field', $_POST['test_field'] ); } function add_event_meta_box() { add_meta_box( 'test_meta_box', 'Test Custom Meta Box', 'render_test_meta_box', TribeEvents::POSTTYPE ); } function render_test_meta_box() { $field = esc_attr( get_post_meta( get_the_ID(), '_meta_box_custom_field', true ) ); print '<input type="text" name="test_field" value="' . $field . '" />'; }I have to admit I’m not familiar with the Meta Box plugin but can only guess it deviates from this sort of pattern. That’s not to say this is the only way to do it, or that there isn’t a bug, just that I’m not convinced there is a problem other than one of integrating the two systems.
Barry
MemberThat’s a lot of events!
I’ll go ahead and close this issue but we are planning on doing something to tackle this and we’ll aim to re-open and post an update as soon as we’ve got something more to report π
Thanks again!
Barry
MemberYes, I do apologize, that should have been:
add_action( 'tribe_pre_get_view', 'change_organizer_field_meta_label' ); function change_organizer_field_meta_label() { tribe_set_meta_label( 'tribe_event_organizer', 'NEW LABEL!', 'meta_group' ); }(There was a typo in the function name.)
Does that help?
Barry
MemberOur pleasure π
Barry
MemberExcellent, glad we got there!
I’ll go ahead and close this thread – but if you have a chance it would be awesome to hear your thoughts on your experience with The Events Calendar so far π
Barry
MemberThanks!
Yes, that ‘s exactly what happens (the event post type is added to the query) as events also make use of regular post tags – so this is actually expected behaviour. What you could do though is also define the following functions:
function stick_to_posts() { add_action( 'parse_query', 'force_post_type_to_posts', 60 ); } function force_post_type_to_posts( $query ) { remove_action( 'parse_query', 'force_post_type_to_posts', 60 ); $query->set( 'post_type', array( 'post' ) ); }Then, at the top of your rm_related_posts() function (right above $tags = wp_get_post_tags($post_id)) add:
stick_to_posts();Does that help with this?
Barry
MemberExcellent, glad you got there. Just in case it helps others though I’ll answer some of the questions you raised earlier.
Is this right? Namely, is right to have two plugin? Perhaps because the PRO version is only an add-on?
Exactly so: Events Calendar PRO builds on (and depends on) The Events Calendar, so both should be activated and they should also be the same branch (ie, version 3.5.x for both, where the x part doesn’t really matter).
If they are on different branches, ie The Events Calendar is 3.5.x and Events Calendar PRO is 3.4.x, which might happen if your license key has expired / is out of installs and you can’t update, you will definitely see the warning you quoted.
What does this mean? My account is valid until Oct 23 2014 in https://theeventscalendar.com/my-account/license-keys/
There are a few reasons this might happen. A common example is changing the domain name – however you can always visit the license key page you linked to and clear our existing licenses, then reuse them.
I hope that clarifies things and I’m glad you sorted everything out π
-
AuthorPosts
