Addd popup on signup link

*** Create a custom registration form using this tip : https://wplms.io/support/knowledge-base/custom-registration-forms-in-wplms/

*** Then add this code in your wplms-customizer.php file in wplms customizer plugin :

add_action(‘wp_footer’,function (){
if(is_user_logged_in())
return;
echo ‘<div id=”register_form” class=”register_form”>’.do_shortcode(‘‘).'</div>’;
?>
<script>
jQuery(document).ready(function($){
$(‘a.vbpregister’).on(‘click’,function(event){
event.preventDefault();
$.magnificPopup.open({
items: {
src: ‘#register_form’,
type: ‘inline’
}
});
});
});
</script>
<style> .logged-out .mfp-content {padding:15px;background:#fff;}</style>
<?php
});

*** Change ” ” in above code with your custom registration form shortcode.

Leave a Reply

Your email address will not be published. Required fields are marked *