Skip to content

Instantly share code, notes, and snippets.

View iriks-it's full-sized avatar

Matthijs Iriks iriks-it

View GitHub Profile
@iriks-it
iriks-it / functions.php
Last active February 21, 2024 14:40
Wordpress shortcode to display a form 7 days before the event starts
<?php
/**
* Function that runs when the shortcode pf_show_event_form is called
* @return string
*/
function pf_show_event_form() {
if (!is_singular('event')){
// This should only ever be called on a event page
return '';