我想我的wordpress插件重定向到自定義頁面,請參考下面的頁面。請參考下面給出的編碼登錄重定向到指定頁面
登錄頁面後登錄我希望他們移動到具體的網址。
我已經嘗試過幾個插件,都沒有做過這個工作。我用:https://wordpress.org/plugins/redirect-after-login/。
所以,請幫助我編輯wordpress中的一些編碼。
請參閱登錄/註冊頁面模板(模板register.php)
<?php
/* Template Name: Login/Register */
get_header();
/* Site Showcase */
imic_page_banner($pageID = get_the_ID());
/* End Site Showcase */
/* Login/Register Page Design Layout
============================================*/
$pageLayout = get_post_meta(get_the_ID(),'imic_register_layout',true);
$contentClass = 4;
if ($pageLayout != 1) { $contentClass = 6; }?>
<!-- Start Content -->
<div class="main" role="main"><div id="content" class="content full"><div class="container">
<div class="page"><div class="row">
<?php
echo '<div class="col-md-'.$contentClass.' col-sm-'.$contentClass.'">';
/* Page Content
======================*/
while (have_posts()):the_post();
the_content();
endwhile;
echo '</div>';
/* Manage Login Form
========================*/
if ($pageLayout == 1 || $pageLayout == 2) { ?>
<div class="col-md-4 col-sm-4 login-form">
<h3><?php _e('Login','framework'); ?></h3>
<form id="login" action="login" method="post">
<?php
$redirect_login= get_post_meta(get_the_ID(),'imic_login_redirect_options',true);
$redirect_login=!empty($redirect_login)?$redirect_login: home_url();
?>
<input type ="hidden" class ="redirect_login" name ="redirect_login" value ="<?php echo $redirect_login ?>"/>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-user"></i></span>
<input class="form-control input1" id="loginname" type="text" name="loginname">
</div>
<br>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
<input class="form-control input1" id="password" type="password" name="password">
</div>
<div class="checkbox">
<input type="checkbox" checked="checked" value="true" name="rememberme" id="rememberme" class="checkbox"> <?php _e('Remember Me!','framework'); ?>
<?php echo '<a href="'.imic_get_template_url('template-reset_password.php').'" title="'.__('Forget Password','framework').'">'.__('Forget Password','framework').'</a>'; ?>
</div>
<input class="submit_button btn btn-primary button2" type="submit" value="<?php _e('Login Now','framework'); ?>" name="submit">
<?php wp_nonce_field('ajax-login-nonce', 'security'); ?><p class="status"></p>
</form>
</div>
<?php } ?>
</div></div></div></div></div>
<?php get_footer(); ?>