我有插件MemberPress。当我添加我的课程时,“登录”按钮不会改变。怎么做对,所以一切正常?
原始代码
<div class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary mepr-share-button " value="<?php _ex('Log In', 'ui', 'memberpress'); ?>" />
<input type="hidden" name="redirect_to" value="<?php echo esc_html($redirect_to); ?>" />
<input type="hidden" name="mepr_process_login_form" value="true" />
<input type="hidden" name="mepr_is_login_page" value="<?php echo ($is_login_page)?'true':'false'; ?>" />
</div>
我的代码
<div class="btn-white">
<div class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary mepr-share-button " value="<?php _ex('Log In', 'ui', 'memberpress'); ?>" />
<input type="hidden" name="redirect_to" value="<?php echo esc_html($redirect_to); ?>" />
<input type="hidden" name="mepr_process_login_form" value="true" />
<input type="hidden" name="mepr_is_login_page" value="<?php echo ($is_login_page)?'true':'false'; ?>" />
</div>
</div>
答案 0 :(得分:0)
确保将该类添加到按钮本身。因此,如果这是您的登录按钮,则需要添加btn-white
类:
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary mepr-share-button btn-white" value="<?php _ex('Log In', 'ui', 'memberpress'); ?>" />
答案 1 :(得分:0)
您的HTML代码应如下所示
<div class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary mepr-share-button btn-white" value="<?php _ex('Log In', 'ui', 'memberpress'); ?>" />
<input type="hidden" name="redirect_to" value="<?php echo esc_html($redirect_to); ?>" />
<input type="hidden" name="mepr_process_login_form" value="true" />
<input type="hidden" name="mepr_is_login_page" value="<?php echo ($is_login_page)?'true':'false'; ?>" />
</div>
希望这有帮助。