how to add a custom shortcode to login or signup form

Hello i am using a plugin wordpress social login plugin that gives an shortcode for custom locations so i just wanna know where i can add it as i tried to create a new page and added a shortcode there and even in settings added that page for course signup but still on course page when u click on signup still popup shows and that will be great if i can add the social login shortcode for the popup one that will be awesome u can see both things here
this is the course page
http://www.melissalovedesign.co.uk/engagenew/courses/aenean-auctor-nec-magna-sed-mattis/

this is the custom login page and social login showing here but i want this social login shortcode in the popup form how to achieve that??
http://www.melissalovedesign.co.uk/engagenew/student-signup/

  • Ash

    Hello @Melissa

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    Please add the following code in your theme's footer.php:

    <script type="text/javascript">
    	jQuery(function($) {
    		$('.apply-button.signup ').click(function() {
        		window.location.href = 'http://www.melissalovedesign.co.uk/engagenew/student-signup/';
     		});
    	});
    </script>
    <style>
    .cp_popup_overall, .cp_popup_window{
    display: none !important;
    }
    </style>

    This highly recommended to use a child theme in this case, as the changes will be lost when you will update the theme. You can learn more about child theme here: http://codex.wordpress.org/Child_Themes

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Melissa

    I already fixed it and found a way to add that but now one issue i am getting is that how can i override the template files of coursepress in theme same we do for woo we add a folder in theme as woocomerce and add the custom templates there so is there a way i can do that here too becoz asap the plugin get updated my customization in the templates will go off ...
    so keep my changes stay there i need to find a way to over ride the template ...

  • Ash

    Hello @Melissa

    Really glad to hear that you have made the popup working :slight_smile:

    About the custom template, let me show you the easiest way. If you go to /wp-content/plguins/coursepress/themes/ folder, you will see another coursepress folder in there. Download the folder in your desktop.

    Open the folder, and you will get all coursepress template files in there.

    You just need to copy the required template files (that you want to make changes) from there, and upload in your /wp-content/themes/THEMENAME/ folder. So, you can customize the file to fit your needs and use the file in there.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Ash

    Hello @Melissa

    I hope you are well today.

    In your child theme, create a folder called coursepress, copy popup-window-login.php in that folder and make your changes.

    Then use the following code:

    add_filter( 'coursepress_signup_steps', 'coursepress_signup_steps_cb' );
    function coursepress_signup_steps_cb( $signup_steps ){
    	$signup_steps['login']['template'] = get_stylesheet_directory() . '/coursepress/popup-window-login.php';
    	return $signup_steps;
    }

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.