Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- This snippet will force event pages to use SSL
- http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
- */
- function my_em_force_ssl( $template ){
- if( !is_ssl() && em_is_event_page() ){
- wp_redirect(str_replace('http:','https:', get_permalink()));
- die();
- }
- return $template;
- }
- add_filter('template_redirect', 'my_em_force_ssl', 10 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement