25% off ProSNIPC25OFF

Add Custom Links Below Login Form

Appends a Privacy Policy and Terms of Service link beneath the WordPress login form using the login_footer action.

PHPby SnipCraft
php
<?php
if ( ! function_exists( 'scseed_login_form_extra_links' ) ) {
    function scseed_login_form_extra_links() {
        $privacy_url = get_privacy_policy_url();
        $terms_url   = home_url( '/terms/' ); // Adjust to your terms page path.
        ?>
        <p style="text-align:center;margin-top:12px;font-size:13px;">
            <?php if ( $privacy_url ) : ?>
                <a href="<?php echo esc_url( $privacy_url ); ?>"><?php esc_html_e( 'Privacy Policy', 'scseed' ); ?></a>
                &nbsp;&middot;&nbsp;
            <?php endif; ?>
            <a href="<?php echo esc_url( $terms_url ); ?>"><?php esc_html_e( 'Terms of Service', 'scseed' ); ?></a>
        </p>
        <?php
    }
    add_action( 'login_footer', 'scseed_login_form_extra_links' );
}
#customization#links#login#ux