Skip to content

Instantly share code, notes, and snippets.

@michaelschofield
Created April 20, 2015 12:54
Show Gist options
  • Save michaelschofield/d8e8037f1e6e41df150a to your computer and use it in GitHub Desktop.
Save michaelschofield/d8e8037f1e6e41df150a to your computer and use it in GitHub Desktop.
<?php
add_action( 'after_setup_theme', 'advwp_create_upcoming_event_feed' );
function advwp_create_upcoming_event_feed() {
// Add_Feed() takes a "title" for the feed, and then a function to call
// In this case, it calls a function that just points to the new
// feed template.
add_feed( 'upcoming', 'advwp_render_upcoming_event_feed');
}
function advwp_render_upcoming_event_feed() {
require_once plugin_dir_path( __FILE__ ) . 'public/templates/feed-event.php';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment