Skip to content

Instantly share code, notes, and snippets.

View ethanclevenger91's full-sized avatar

Ethan Clevenger ethanclevenger91

View GitHub Profile
@ethanclevenger91
ethanclevenger91 / wp_custom_title_placeholder_text.php
Created July 9, 2014 15:22 — forked from isGabe/wp_custom_title_placeholder_text.php
Change placeholder text for "Enter title here" on a custom post type
<?php
/*
replacing the default "Enter title here" placeholder text in the title input box
with something more descriptive can be helpful for custom post types
place this code in your theme's functions.php or relevant file
source: http://flashingcursor.com/wordpress/change-the-enter-title-here-text-in-wordpress-963
*/
@ethanclevenger91
ethanclevenger91 / programmatically-add-tribe-event-ticket.php
Last active November 24, 2023 14:46 — forked from barryhughes/programmatically-add-woocommerce-etp-ticket.php
Programmatically add a Tribe Events Calendar event with tickets and attendee meta
<?php
$event_id = tribe_create_event( [
'post_title' => 'My Event',
// see https://docs.theeventscalendar.com/reference/functions/tribe_create_event/ for full arguments
] );
$provider = \Tribe__Tickets__Tickets::get_event_ticket_provider();
$ticket_id = $provider::get_instance()->ticket_add( $event_id, [
@ethanclevenger91
ethanclevenger91 / functions.php
Created March 3, 2021 21:09 — forked from cliffordp/functions.php
The Events Calendar Get Events for 1 Year from Today in iCal Export File -- http://example.com/events/?ical=1&year-feed
<?php
// From https://gist.github.com/cliffordp/ab1f7c4d95723ee6f892/, a fork of https://gist.github.com/jesseeproductions/2b1af6527b7029eaea6e
// References:
// https://theeventscalendar.com/support/forums/topic/ical-only-pushing-1-month-at-a-time/
// https://theeventscalendar.com/support/forums/topic/how-users-can-subscribe-to-my-events-calendar-in-their-personal-calendars/#post-1022932
// https://tribe.uservoice.com/forums/195723-feature-ideas/suggestions/3777092-subscribe-to-calendar-via-ical
/*
* The Events Calendar Get Events for 1 Year from Today in iCal Export File
* add coding to child theme's functions.php
* Tested works with The Events Calendar v3.12 and v4.0