Created
April 20, 2015 12:54
-
-
Save michaelschofield/d8e8037f1e6e41df150a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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