Matthew

Forum Replies Created

Viewing 13 posts - 31 through 43 (of 43 total)
  • Author
    Posts
  • Matthew
    Member

    Howdy Kevin!

    I’m sorry that you are experiencing an error 🙁 Let’s see if we can get to the bottom of it. Sometimes when an HTTP 500 Internal Server Error is thrown when deactivating the Events plugins, the culprit is a bit of code in the theme (or plugin) that uses The Events Calendar functions. We have a handy Knowledgebase post that should be of use – Testing for Conflicts. Walking through those steps should give us a better understanding on whether there is a bug within The Events Calendar/The Calendar Events Pro or if there is a bit of code somewhere else that needs to be fiddled with.

    I look forward to hearing how the test goes!

    Matthew
    Member

    Thank you for sharing that snippet – I believe it holds the key to the issue!

    The WP_Query call doesn’t appear to take the dates of the events into account. I think we can make that event fetching a bit simpler with a function call that is provided by The Events Calendar. Check out tribe_get_events() – which is basically an ultra fancy event-compatible WP_Query! You should be able to grab the posts that you are expecting using the following:

    
    $events = tribe_get_events( array(
    	'tax_query' => array(
    		array(
    			'taxonomy' => 'tribe_events_cat',
    			'field' => 'id',
    			'terms' => 13
    		),
    	),
    ) );
    

    $events will then contain an array of post objects that you can loop over! Let me know how it goes!

    Matthew
    Member

    Excellent! We’re closer!

    I have tried recreating the problem in my own site (running Twentyfifteen and only Tribe Event plugins) but can’t seem to see the issue yet. Perhaps we could test for conflicts with the theme and plugins? We have a handy article about testing for conflicts that can walk you through that process!  When you follow those steps, does the problem remain?

    Matthew
    Member

    Howdy mrhiking!

    I took a peek at your Upcoming Events tab and I’m going to try to help you get to the bottom of this 🙂 Just so that I have the full picture of what is going on, can you tell me a little bit about that Upcoming Events tab?  I don’t want to start throwing ideas around if they aren’t any use to you!

    1. Are you leveraging the Events List widget to power the Upcoming Events tab?
    2. Can you share the snippet of code that outputs the date for that event?

    With that info, we should be able to start to get rolling on finding a solution to that date problem!

    Matthew
    Member

    Whoops, I definitely misunderstood the initial question. Sorry about that! There is a checkbox within Events > Settings called Recurring event instances that controls how a recurring events are displayed within the Events Featured Venue widget. When checked, that setting will collapse recurring events into a single event – the next event occurring at that venue.

    Screen Shot 2015-03-30 at 9.50.07 AM

    Do you have that checkbox checked already? If not, can you do so and let me know the results?

    in reply to: date time separator #951604
    Matthew
    Member

    Not a problem! Your safest course of action would be to avoid editing any of the JavaScript files within “The Events Calendar” plugin.  I just looked at your theme and didn’t spot a JS file that you could easily place that snippet of code into…however, you can add the code to your theme‘s functions.php file as long as you wrap it in a function and hook it to the wp_footer action, like so:

    
    function standrews_twiddle_calendar_datetime() {
      ?>
      <script>
      jQuery( function( $ ) {
    	// find elements with tribejson (that haven't had their duration fiddled with) and make sure <br> tags are rendered as <br> tags.
    	$( '[data-tribejson]:not(.twiddled-date)' ).on( 'mouseover', function() {
    		var $el = $( this );
    
    		// give the tooltips time to render and then twiddle the date to replace <br> with <br>
    		setTimeout( function() {
    			var $abbr = $el.find( '.duration .tribe-events-abbr' );
    			$abbr.html( $abbr.html().replace( /\&lt\;br\&gt\;/, '<br>' ) );
    			$el.addClass( 'twiddled-date' );
    		}, 100 );
    	});
      });
      </script>
      <?php
    }
    add_action( 'wp_footer', 'standrews_twiddle_calendar_datetime' );
    

    It’s ok to be a little dangerous 🙂 Let me know how this works out for you!

    Matthew
    Member

    Not a problem! There should be a functions.php file within your theme (check out the WordPress documentation for more info on finding it and what it does). You should be able to place the code that I posted earlier in one of two ways:

    • If functions.php has “?>” at the bottom of the file, place the code directly above that!
    • If functions.php does not have “?>” at the bottom of the file, place the code at the very bottom.

    I look forward to hearing how it works out! 🙂

    in reply to: date time separator #951593
    Matthew
    Member

    Howdy LeAnne!

    Oh, that is an excellent catch! I can see why you wouldn’t want HTML displaying in the tooltips 🙂  The way our plugin is generating those tooltips helps protect end users from unsafe HTML at the expense of some flexibility – out of the box.  The good news is, you should be able to get those tooltips to display with a line break with a tiny bit of JavaScript!  I threw the following in my theme’s JS file and had great results:

    
    jQuery( function( $ ) {
    	// find elements with tribejson (that haven't had their duration fiddled with) and make sure <br> tags are rendered as <br> tags.
    	$( '[data-tribejson]:not(.twiddled-date)' ).on( 'mouseover', function() {
    		var $el = $( this );
    
    		// give the tooltips time to render and then twiddle the date to replace <br> with <br>
    		setTimeout( function() {
    			var $abbr = $el.find( '.duration .tribe-events-abbr' );
    			$abbr.html( $abbr.html().replace( /\&lt\;br\&gt\;/, '<br>' ) );
    			$el.addClass( 'twiddled-date' );
    		}, 100 );
    	});
    });
    
    

    Does that suit your needs?

    Matthew
    Member

    Hello Luciane – excellent questions!

    I’m glad to hear you like the Community Events plugin! I like that one too 🙂 Since both of your questions are good ones, I don’t want one of them to get lost in the mix. Would it be possible to ask you second one in a separate post so that it can get the attention that it deserves as we work through the first question?

    I can see why exposing your Organizer name to end users may be undesirable. The drop down box that shows your organizer name (trilheiros.net) will grow over time to include other event organizer names. If you want to keep things simple and hide that box completely, there is a really handy filter called tribe_organizer_table_top that you can use to prevent the field (and the label) from displaying. Simply add the following to your functions.php file:

    
    if ( ! is_admin() ) {
    remove_filter( 'tribe_organizer_table_top', array( Tribe__Events__Events::instance(), 'displayEventOrganizerDropdown' ) );
    }//end if
    

    That should hide the “Use Saved Organizer” box and users will be able to enter their own Organizer name in the field provided.  Is that approach to the problem one that will work for you?

    Matthew
    Member

    Howdy Greg!

    I’m sorry that you are struggling with the Recurring Events 🙁 Your question about hiding them is a great one. I’ll do my best to help point you in the direction of a solution!

    You indicated that you checked the “Hide From Event Listings” box on the recurring event. Did you do so on a single instance of the event (this can be easy to do) or were you editing the event series? To make sure you are editing the event series, you can find the event in the Events page in the Dashboard and click Edit All. Once on that event edit page, click the Hide From Events Listings checkbox and click the Update button to save your changes. That should save the setting for all recurring events in that series.

    Do those steps work for you?

    in reply to: Non-AJAX navigation for List view #951323
    Matthew
    Member

    Howdy Marty – that’s a solid question!

    Disabling Ajax-driven paging on the month and the day view works swimmingly with this tip. But, as you’re experience has shown you, non-Ajax pagination on the list view doesn’t work so well.  The good news is, your code looks pretty good and with a few tweaks I think we may be able to find a solution that should work.  Can you try a few tweaks for me and let me know how they go?

    First, make sure this is in your functions.php file:

    
    /**
     * Remove Ajax from The Events Calendar Pagination on List View
     * @3.8
     *
     */
    add_action('wp_print_scripts', 'events_calendar_remove_scripts' , 10);
    function events_calendar_remove_scripts() {
      wp_dequeue_script( 'tribe-events-list');
    }
    

    Next, try tweaking your spellerberg_* functions to make use of the tribe_get_listview_link() in place of any of the calls to tribe_get_past_link() and tribe_get_upcoming_link().  That function returns the List view URL used by the List view JS to build the previous/next Ajax requests.  My quick test of your functions with that change gave me some promising results!

    Does that help point you in the right direction?

    in reply to: Title, SubTitle, Venue Name and Date #951288
    Matthew
    Member

    Hello dgpixel – great question!

    Thank you for providing that example image so that I can see what you’re hoping to accomplish.  The function tribe_events_event_schedule_details() outputs the date for an event. You can customize its output with the filter of the same name: tribe_events_event_schedule_details.  Another functions that may be of use to you when building your filter is tribe_get_venue_label_singular(), which outputs the venue name.

    Does that help to get you started?

     

    in reply to: Modifications to event listing page (single-event.php) #951234
    Matthew
    Member

    Howdy faygenholtz – those are great questions!

    Nice research on item #1 – that is definitely the right place to look! The link itself is generated by the tribe_get_event_link() function which has a filter of the same name – tribe_get_event_link. Using that filter you should be able to change the URL to something that fits your use case.

    For item #2, there is a handy action in the same file called tribe_events_after_the_content that you can hook to and output anything you’d like and it will appear below the Find out more link!

    Does that steer you in a useful direction?

Viewing 13 posts - 31 through 43 (of 43 total)