add custom filters to the event calendar plugin programatically to frontend [closed]
add custom filters to the event calendar plugin programatically to frontend [closed]
add custom filters to the event calendar plugin programatically to frontend [closed]
Figured it out with help from an SO user! This will remove the ld+json block added by The Events Calendar: add_filter( ‘tribe_google_data_markup_json’, ‘__return_empty_string’, 20 );
You can hook into post_updated action, if you want to access the post’s data after it’s been published. This hook passes the post’s ID, inundated post object, and updated post object. add_action( ‘post_updated’, ‘update_event_date’, 10, 3 ); function update_event_date( $post_id, $post_after, $post_before ){ $post_type = get_post_type( $post_id ); $event_datee = get_post_meta( $post_id, ‘_EventStartDate’, true ); … Read more
Okay, I found the solution myself. I used the WordPress hook parse_query. This is the most precise thing I found. And in this hook I check if it is backend and my user has his meta data called “organizer_id” which I added earlier. But it is only to get the needed organizer_id for filtering the … Read more
I was successfully able to disabled The Events Calendar plugin for users that are not logged in by using only filters (see below). The dequeue_tec_scripts function dequeues scripts loaded by the plugin. The restricted_access_template function, redirects the user to a custom template named ‘restricted_access.php’ or ‘404.php’ if the template file is not found. I haven’t … Read more
You can get the post id outside the loop with $wp_query and then feed it to tribe_is_event(). works a treat. <?php global $wp_query; if (tribe_is_event($wp_query->post->ID)) {echo “yup”; } else {echo “nah”; } ?>
You could just try to change the slug to the value you need for each event. The problem arises if you have the same event twice (or more) in the same month though. You will need to create a new title for the event. you can try this plug-in: http://wordpress.org/extend/plugins/custom-post-type-permalinks It might help you with … Read more
Extend ‘The Events Calendar’ search to include custom fields [closed]
What I would do is create a query for the _EventStartDate with a custom ‘eventDisplay’. This will grab all events, ordered by the start date. Then, once you get into the loop; compare the start date to a specific date that you want to output. tribe_get_start_date() accepts a date format parameter (see here) that will … Read more
The “Now onwards” string is translated with _x() which is different than __() because it allows context to be added to the string being translated. Because there is context, you need to use gettext_with_context instead of gettext. Here’s a simple example based on the one in the WP.org Code Reference: function example_gettext_with_context( $translated, $text ) … Read more