Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Replace template with newsletter template if tagged with "road runner" */
- if ( ! function_exists( 'newsletter_template' ) ) :
- function newsletter_template( $template )
- {
- if( preg_match("/.*road.*runner.*/i", get_query_var('tag')) )
- {
- $new_template = locate_template( array( 'newsletter.php' ) );
- if ( '' != $new_template ) {
- return $new_template ;
- }
- }
- return $template;
- }
- endif;
- add_filter( 'template_include', 'newsletter_template', 99);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement