Forum Replies Created
-
AuthorPosts
-
Mathew
ParticipantThis reply is private.
Mathew
ParticipantAfter implementing Nico’s custom function, it had a negative effect on Google search results. I tweaked the function a bit and after a week, search results are now correct.
Here’s what I came up with. The key is, and pass it along, using UTC with no offset.
function tribe_modify_json_ld_event_dates ( $_data, $args, $event ) {
$_data->startDate = date_create( tribe_get_start_date( $event->ID, true, Tribe__Date_Utils::DBDATETIMEFORMAT ) )->setTimezone( new DateTimeZone( 'UTC' ) )->format( 'c' );
$_data->endDate = date_create( tribe_get_end_date( $event->ID, true, Tribe__Date_Utils::DBDATETIMEFORMAT ) )->setTimezone( new DateTimeZone( 'UTC' ) )->format( 'c' );return $_data;
}
add_filter( 'tribe_json_ld_event_object','tribe_modify_json_ld_event_dates', 10, 3 );Mathew
ParticipantMathew
ParticipantMathew
ParticipantThis reply is private.
Mathew
ParticipantHelen,
The good news is that it’s not a conflict with your theme or third-party plugins. The stray comma is there by design.
There’s an assumption that venue details will contain other metadata, such as an address. So the TEC list template places a separator between these values.
The separator is set on line 56 of the-events-calendar/src/views/list/single-event.php.
You will need to override the list template with customization to your liking. Please note that simply removing the separator from the template will have an effect on venues that do need the separation between values.
There are ways to get around this with the isset function. This would require some customization around the tribe_get_venue_details within the list view template.
So that your customization efforts survive a product update, it is best to follow the Themer’s Guide. It’s a great starting point for this type of customization.
Hope this helps gets you closer to a solution.
Mathew
ParticipantUpdate.
The issue stems from a change made in version 5.1.6 of Avada in an attempt to deal with excerpts and shortcodes, essentially overriding the filters in TEC’s general.php.
While the change had the desired effect, it broke other critical areas.
I have highlighted the culprit code within their support tier and it will be addressed in a upcoming hotfix.
Mathew
ParticipantNeal,
I’ve tried all the various settings in TEC to no avail. However, I found this little gem and it resolved the issue. Thanks @nicosantos for the snippet!
As I mentioned, the issue is present on the TEC demo site.
Mathew
ParticipantKevin,
You’re so close to having all the pieces to the puzzle. From what Shelby mentioned, to Gustavo’s GIST, it’s a matter of putting it all together.
Here’s what I have used for a customer.
* If you are using Gustavo’s GIST, then inject lines 3-9 of the following into it. If your not using it, then insert the entire function into your custom functions.php.
function additional_tooltip_fields( $json, $event, $additional ){ //important to deal with empty values $json['event_website'] = ''; // make the magic happen $url = tribe_get_event_website_link( $event ); if ( $url ) { $json['event_website'] = tribe_get_event_website_url( $url ); } return $json; } add_filter( 'tribe_events_template_data_array', 'additional_tooltip_fields', 10, 3 );Now edit tooltips.php and insert the above code in between the script divs where you want it positioned and displayed. If you are using the latest version of TEC, there’s now two scripts in tooltips.php. Add this to both script sections.
Hope this helps.
Mathew
ParticipantThe syntax highlighter played havoc with the brackets. Here’s an image of what the tooltips.php edit should look like.
Mathew
ParticipantKevin,
You’re so close to having all the pieces to the puzzle. From what Shelby mentioned, to Gustavo’s GIST, it’s a matter of putting it all together.
Here’s what I have used for a customer.
* If you are using Gustavo’s GIST, then inject lines 3-9 of the following into it. If your not using it, then insert the entire function into your custom functions.php.
function additional_tooltip_fields( $json, $event, $additional ){
//important to deal with empty values
$json['event_website'] = '';// make the magic happen
$url = tribe_get_event_website_link( $event );
if ( $url ) {
$json['event_website'] = tribe_get_event_website_url( $url );
}return $json;
}
add_filter( 'tribe_events_template_data_array', 'additional_tooltip_fields', 10, 3 );
Now edit tooltips.php and insert the following in between the script divs where you want it positioned and displayed. If you are using the latest version of TEC, there’s now two scripts in tooltips.php. Add this to both script sections.
[[ if(event_website.length) { ]]
<div class="tribe-events-event-url">Event Website: View Website</div>
[[ } ]]
Hope this helps.
Mathew
ParticipantThere’s two filters that come into play. One allows it and one removes it. Here’s an article on both.
Hope this helps.
April 14, 2017 at 11:25 am in reply to: Column width for post TITLE in events (dashboard) / can it be adjusted? #1270236Mathew
ParticipantThis is an issue that I have noticed too. A work-around is to install Modern Tribe’s Advanced Post Manager plugin and the issue will resolve itself.
Alternatively you can also download/install the plugin from the Events admin screen. Near the top there’s a “PSSST! Looking for filters?” link.
TEC Support – As for the root cause, if you compare the CSS when the APM plugin is active to when it’s not, you will see why the title column is squished. Yes you can adjust the column width with custom functions, but it should be addressed in another manner.
Hope this helps.
Mathew
ParticipantJean,
There is a setting in Avada that controls this. It’s documented here on Theme Fusion’s support site.
Hope this helps.
-
AuthorPosts
