Skip to content

Instantly share code, notes, and snippets.

@joshfeck
joshfeck / aluewidget
Created June 29, 2012 21:59
add link to u e widget
</p>
<?php
break;
}
}
}
?>
<p><a href="<?php echo site_url(); ?>/events">See all events</a></p>
<?php
/* After widget (defined by themes). */
@joshfeck
joshfeck / venue_city_sc.php
Created July 3, 2012 14:15
espresso venue city shortcode
// derived from espresso_venue_sc
if (!function_exists('espresso_venue_city_sc')) {
function espresso_venue_city_sc($atts) {
global $wpdb, $this_event_id;
empty($atts) ? '' : extract($atts);
$FROM = " FROM ";
@joshfeck
joshfeck / uew-mod2.php
Created July 3, 2012 23:22
widget mod that adds Venue city and price
<p>
<a href="<?php echo $registration_url; ?>">
<strong><?php echo stripslashes_deep($event->event_name) ?></strong>
-
<?php echo do_shortcode('[ESPRESSO_VENUE_CITY event_id="'.$event->id.'"]');?>
-
<?php echo event_date_display($event->start_date) ?>
-
$<?php echo do_shortcode('[EVENT_PRICE event_id="'.$event->id.'" number="0"]');?>
</a>
@joshfeck
joshfeck / authaim-mmyy
Created July 11, 2012 19:22
authaim mmyy
<label for="exp_date"><?php _e('Exp. Date (mmyy)', 'event_espresso'); ?></label>
@joshfeck
joshfeck / nth-confirmation
Created July 12, 2012 14:50
hides mention of price on confirmation screen by using the nth child selector
table#event_espresso_attendee_verify tr:nth-child(2), table#event_espresso_attendee_verify tr:nth-child(4){display:none;}
@joshfeck
joshfeck / event_list.php
Created July 23, 2012 18:31
Alternate event_list.php template for using with the Recurring Events Manager. Pair with the event_list_display.php template. Upload to /wp-content/uploads/espresso/templates
<?php
//This is a template file for displaying a list of events on a page. These functions are used with the {ESPRESSO_EVENTS} shortcode.
//This is an group of functions for querying all of the events in your databse.
//This file should be stored in your "/wp-content/uploads/espresso/templates/" directory.
//Note: All of these functions can be overridden using the "Custom Files" addon. The custom files addon also contains sample code to display ongoing events
if (!function_exists('display_all_events')) {
function display_all_events() {
event_espresso_get_event_details(array());
}
@joshfeck
joshfeck / e_l_d_readmore.php
Created July 24, 2012 13:29
add read more link
<p><?php echo espresso_format_content($event_desc); ?><a href="<?php echo $registration_url; ?>">Read more&rarr;</a></p>
@joshfeck
joshfeck / ext_url_widget.php
Created July 24, 2012 17:06
change logic in widget.php so external URL's open in a new tab
//adding markup to the logic on line 81 of widget.php
$registration_url = $event->externalURL != '' ? '<a target="_blank" href="' . $event->externalURL . '">' : '<a href="' . espresso_reg_url($event->id) . '">';
//later, on line 130, the a tag needs to be removed from the markup:
<p><?php echo $registration_url; ?><?php echo stripslashes_deep($event->event_name) ?> - <?php echo event_date_display($event->start_date) ?></a>
@joshfeck
joshfeck / add-qty-to-ticket.php
Created July 26, 2012 15:12
adds a new shortcode for printing a ticket quantity
function espresso_replace_ticket_shortcodes($content, $data) {
global $wpdb, $org_options;
$SearchValues = array(
//Attendee/Event Information
"[att_id]",
"[qr_code]",
"[gravatar]",
"[event_id]",
"[event_identifier]",
"[registration_id]",
@joshfeck
joshfeck / page-calendar.php
Created July 30, 2012 13:44
calendar page template for the striking WordPress theme
<?php
/*
Template Name: Calendar
*/
if(is_blog()){
return require(THEME_DIR . "/template_blog.php");
}elseif(is_front_page()){
return require(THEME_DIR . "/front-page.php");
}
$layout = get_post_meta($post->ID, '_layout', true);