The Events Calendar featured image as body background?

<?php if (has_post_thumbnail( $post->ID ) ): $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' ); elseif (tribe_event_featured_image( $event_id = get_the_ID())): $thumb = get_attachment_image_src(tribe_event_featured_image( $event_id), 'large' ); else: $thumb = array(get_template_directory_uri().'/images/background.jpg'); endif;?> <body <?php body_class(); ?> style="background-image: url('<?php echo $thumb['0'];?>') no-repeat fixed"> Hello Sir Experts, Please help, i am using "The Events Calendar" plugin, and i want to use event featured image as body backgound. Please check code! and it's demo event page: http://rankonone.com/dev/downtown/event/the-lion-king/
Category: Web

how can I override The Events Calendar query modifications?

I am implementing some special search options that should exclude anything not of the type post. The Events Calendar is interfering and modifying the query on the fly anyway. My query mod just looks like: $query->post_type And I am doing this before the query in question: remove_action( 'pre_get_posts', [ 'Tribe__Events__Query', 'pre_get_posts' ], 50 ); remove_action( 'parse_query', [ 'Tribe__Events__Query', 'parse_query' ], 50 ); ...and restoring the actions afterward to resume normal operation. So with this debug code: add_filter('query', function($sql) { global …
Category: Web

The Events Calendar EventURL not displaying

I have a custom footer with events being brought in. However, links are no longer showing while using tribe_get_event_meta. The link given is just my home url link and not the link to the event page. My link code is <?php global $post; $i = 0; $events = tribe_get_events( array( 'posts_per_page' => 3, )); foreach ( $events as $post ) { setup_postdata( $post ); ?> <a class="event-links" href="<?php echo tribe_get_event_meta( get_the_ID(), '_EventURL', true ); ?>" target="_self"> <li class="evlist" id = …
Category: Web

Customize The Events Calendar order of columns in the CSV export

I am customizing the CSV export in the Events Calendar plugins. I already added the custom columns that I need thanks to this code: https://gist.github.com/andrasguseo/6caca108be48c0446ce97a080a5eced5 But now I hit the wall with something that should be easier. I want to add the new custom columns at the end, not in the middle of the other columns. Can someone here shed some light or give me pointers?
Category: Web

Changing the words 'Now' & 'onward' to just the single word 'Dates' in The Events Calendar

I am trying to change 'Now onwards' to just 'Dates'. Something similar was done on: I use the events Calendar Plugin and I want to change some words When I used Kevin's snippet, from the link above, I could not get it to replace both 'Now' and 'Onwards'. How can I get it to replace both of those words? This is what I have so far: function example_gettext_with_context( $translated, $text ) { if ( 'Now' == $text ) { $translated …
Category: Web

I use the events Calendar Plugin and I want to change some words

Good Morning, I use Events Calendar for our Website, now I want to change the "Now onwards" and "onwards" on top of the page, also the next and previous at the bottom of the event calendar. I already tried to change it with their documentation (and support) but it didn't work. As we are a German business without English business Connections we don't want to have some English text on our page.. Thank you in advance.
Category: Web

How to Create Events Calendar

How onthisday.com has been made? I'd want to make something similar. I guess I need to have a database with some events happened in a day (6 february 2021, 6 february 2020, 6 february 2019 ... 6 february 2014) and then I want to show all the events happened on that day. I have no idea on how to start and I'll appreciate any help. Thanks
Category: Web

Modern Tribe Calendar wp-query with meta query not working at all

I've been searching for a good few days now trying to get my WordPress event calendar by modern tribe working as I need it to. I have hundreds of order by and delivery dates in DB each one separated by about 5-10 weeks. what I'm trying to achieve is a list where I can see the all the events starting on today's or yesterday's date. This sounds simple however the problem appears to be when you query events between two …
Category: Web

Custom Permalink Structure for The Events Calendar

I am trying, programmatically, to alter the permalink structure of events created by The Events Calendar plugin. I already have other posts and pages set-up and don't want to change the permalink settings. So the plugin currently creates events with structure: mysite.com/event/some_event_name The current site (non-WordPress) currently uses: mysite.com/events/event_year/some_event_name I would like to keep that structure. I have code that creates a permalink, or at least partly: function my_custom_rewrite() { global $wp_rewrite; $wp_rewrite->add_permastruct('tribe_events', '/events/%year%/%name%/', false); $wp_rewrite->flush_rules(); } add_action('init', 'my_custom_rewrite'); function …
Category: Web

WP_Query for custom post type and category_id not working

I am tring to implement custom filter for The Event Calendar. I have used this code $args = array( 'post_type' => 'tribe_events', 'meta_key' => '_EventStartDate', 'meta_query' => array( array( 'key' => '_EventStartDate', 'value' => array( $start_date, $end_date ), 'compare' => 'BETWEEN', 'type' => 'DATE' ) ), 'category__in' => array( 2, 6 ) ); $query = new WP_Query($args); It will return blank post
Category: Web

Create post and update in the same flow

Intro: I'm using a weird plugin called The Events Calendar which vastly operates outside of WP functions. For example, I cannot retrieve custom fields with the WP function. So essentially, my problem is that I need to update a different post type from the custom content posted in an Events Calendar CPT but I can only retrieve it, after the post has fully been saved, not on "save_post" action hook because there is no post meta information at that moment. …
Category: Web

How to modify list of events in backend (admin) of The Events Calendar plugin?

In my Wordpress site I use plugin The Events Calendar (pro). There is a page with list of Events in backend. Link to this page looks like this: https://example.com/wp-admin/edit.php?post_type=tribe_events So now I need to hook/filter into this list of events to modify it. My task is to initially show events of only one particular organizer. Tried looking through exisiting hooks and filters of this plugin. But nothing seems to suit me. Also tried looking into plugin files, but couldn't find …
Category: Web

Writing a function to detect an event

I'm using The Events Calendar to handle events on a site I'm building. I'd like an include to fire if the user is on an events page (archives, single etc etc). My include has a handful of custom hooks which handle enqueuing, dequeuing and inserting custom HTML. Here's what I've tested: /** * Detect Tribe Events and add text to top of page */ if ( class_exists( 'Tribe__Events__Main' ) ) { // Only triggers if plugin is active function is_tribe_calendar() …
Category: Web

Extend 'The Events Calendar' search to include custom fields

I am using the following code to modify the default WordPress search and The Events Calendar search to include custom fields. The custom fields are added by the Advanced Custom Field (ACF) plugin (https://advancedcustomfields.com/). I am particularly interested in a field which is a ACF repeater field. (Although, it would be helpful if all post_meta associated with the event post can be searched.) /** * Extend WordPress search to include custom fields * http://adambalee.com/search-wordpress-by-custom-fields-without-a-plugin/ * * https://theeventscalendar.com/support/forums/topic/how-to-include-custom-fields-in-search/ */ /** * …
Category: Web

tribe_get_start_time displays the current date and time on other post types than tribe_events

i am displaying posts selected by an ACF relationship (with object format) on a page, including custom posts like tribe_events. I want to display the date and time on the tribe_events posts, but not on the other posts. I am using this code below. It displays correctly the start date and time of the tribe_events, but it also displays the current date and time on the other posts. What can i don to have the date and time only on …
Category: Web

Sorting dynamic select/dropdown for Contact Form 7 of Modern Tribe Events posts

What I have is a dynamic dropdown/select box in Contact Form 7 I believe to be based on this: https://gist.github.com/morgyface/56474f0a37abb7d622880daf6eff6e40 It's been a while since I worked on this so details are a little foggy, but we've only recently realized there's a problem with the order and I'm not really even sure where to start looking to fix it. I remember this whole thing taking me way too long to figure out to the point I have it now, and …
Category: Web

Events Calendar Multisite 404 for events

I haven't seen any solutions that work for me or apply to my use case. but, I have a url like https://www.example.com/site1/event/some-event-2017-01-17/2018-08-30/ this will throw a 404 page not found (the default 404 for my WP install) but https://www.example.com/site1/event/other-event-4-2017-10-28-2018-03-03-2018-09-01/ will load the event. I don't really know what may be causing the 404, but: is it because i don't have a Multisite license for Events Calendar Pro? the htaccess rules don't cover that many segments in the URI? this is …
Category: Web

The Events Calendar - Datepicker not working

The dropdown datepicker is throwing a not found error. I am not sure if this is a 3.2 issue or not, because I did not install this plugin until after the 3.2 release, but I know the datepicker is a jQuery function, so it might be. You can view the error here: Sample error for datepicker choice of August, 2011: http://hammondmarina.com/wp/category/events&eventDisplay=month&eventDate=2011-08 (Select the "Events Calendar" from the main menu to get to the grid. New here so I can't post …
Category: Web

add custom filters to the event calendar plugin programatically to frontend

I want to add custom filters to the filter bar of the event calendar. I have added two dropdown as categories and location programtically, when I submit the selected filters to find events, it gives me error in console as Uncaught TypeError: Cannot read property 'length' of null in \plugins\the-events-calendar\src\resources\js\tribe-events-bar-min.js I tried to print the value of e, so it is giving as e = http://192.168.10.200:8181/asha/c2c/events/month/ e = e = 55 e = null Now there are 4 filters in …
Category: Web

Add meta field after post has been published

I'm trying to add a custom field of event_month when a post is published or saved. I'm using the save_post action and getting the contents of a custom field containing the date and trying to store this in a separate custom field with just the month. This works perfectly when saving a post that has already been created. I've shown my code below. add_action('save_post', 'update_event_date'); function update_event_date($post_id){ $post_type = get_post_type($post_id); $event_datee = get_post_meta($post_id, '_EventStartDate', true); if ($post_type == 'tribe_events'){ $month …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.