我是新來的Wordpress,所以請忍受我在這裏。Wordpress功能停止頁面渲染
我導航到另一個頁面,從一個WordPress頁面以下鏈接:
<a href="<?php echo site_url(); ?>/wp-content/themes/woffice-child-theme/page-templates/loginF.php"><img src="./wp-content/themes/woffice-child-theme/page-templates/images/signin-btn.png"></a>
loginF.php做負載,但在任何地方的頁面我叫喜歡HOME_URL任何WordPress的()的函數或wp_login_form( )頁面停止呈現。例如,如果我將home_url()放在頁面的開頭,那麼我會在瀏覽器中看到一個空白頁面。這是爲什麼發生?我以某種方式離開wordpress上下文嗎?該怎麼辦?
這裏是loginF.php:
<html>
<?php
$redirect_url = home_url();
?>
<head>
<title>Title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="/wp-content/themes/woffice-child-theme/page-templates/style2.css">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,300' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="frontpage-content">
<div class="front-wrap">
<br/>
<div class="new-login-logo text-center"><img src="/wp-content/themes/woffice-child-theme/page-templates/images/new-login-logo.png"></div>
<br/><br/>
<div class="frontpage-fields">
<input type="text" name="log" id="user" class="input" placeholder="Email Address">
<input type="password" name="pwd" id="pass" class="input" placeholder="Password">
</div>
<div class="forgot-password-new"><a href="#">Forgot your password?</a></div>
<br/>
<div class="text-center"><a href="#"><img src="./images/captcha-image.png"></a></div>
<br/>
<div class="text-center new-login-space"><a href="#"><img src="/wp-content/themes/woffice-child-theme/page-templates/images/new-login-btn.png"></a></div>
</div>
</div>
</body>
</html>
已添加,但情況相同。 – user3151013