Where I can add a line of custom PHP code on the login page?

Posted in: Newspaper
Post count: 3

Dear Newspaper Support,

I am a newbie and was trying to locate where should I put a custom PHP code from one of my plugins which should be able to let me using social logins instead of just login or register with email in the login page. (The login function in the homepage, where the login/register link to a lightbox to perform)
The codes are <?php echo open_social_login_html();?>
To make it clearer, please see https://imgur.com/a/geGcA.

Thanks,
Eric

  • This topic was modified 8 years by qxk970517.
Post count: 20688

Hi,

This is a similar topic, it mentioned the file where the modal is defined
https://forum.tagdiv.com/topic/want-social-login-short-code-on-login-page/
Also a similar topic here
https://forum.tagdiv.com/topic/social-login-pushes-signup-button-out-of-view/

Thanks

Post count: 3

Thanks Simion, I found your links are very helpful. I did managed to arrange them under the forget password link.
Here are my codes for people using “Open Social” plugin via shortcode:
Line 41<input type="button" name="login_button" id="login_button" class="wpb_button btn td-login-button" style="position:relative; bottom:25px;" value="' . __td('Login', TD_THEME_NAME) . '">
Line 42<div class="td-login-info-text" style="position:relative; bottom:25px;">' . __td('Forgot your password? Get help', TD_THEME_NAME) . ''.do_shortcode('[os_login show="sina"]').'</div> <div style="position:relative; bottom:45px;">' .
Line 43$users_can_register_link . '</div>

I did managed to arrange the position of register button a little bit so it will show at the right place.

Thanks for the quick support response again,
Eric Qian

Post count: 20688

Glad you could achieve the desired results and also for posting the implementation, this may be useful for other users as well.

Thank you!

Post count: 3

Hmm its not working be me?
i dont know what i wrong..
Have somebody good instal intructions for me?

Post count: 20688

Maybe qxk970517 could provide more information about how he did it, and help you do it as well.

Post count: 3

Thank you for awnser Simon.
I have not good software for edit .php document maybe is that the problem?
I do now edit in my fillazilla with notepad.
(Newspaper>parts>header>td-login-modal.php)

Post count: 20688

Be sure to verify the syntax maybe there are errors in the modifications you make. A file editor with syntax checker or validation is very useful when editing code.

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.