我正在使用此代码,但现在我在网站上收到错误500。删除它会使网站正常工作。
<?php
do_action( 'storefront_before_header' ); ?>
<header id="masthead" class="site-header" role="banner" style="<?php storefront_header_styles(); ?>">
<div class="logad" id="logad">
<?php
if ( is_user_logged_in() ) {
global $current_user;
get_currentuserinfo();
echo '<ul class="logad" >
<li class="o">Olá, '.$current_user->user_firstname.'.</li>
<li class="d">
<a href="https://3brow.com/minha-conta" class="ver">Ver minha conta</a>
<a href="https://3brow.com/minha-conta/Sair/" class="sair">Sair</a></li>
</ul>';
} else {
echo '<ul class="ent">
<li><a href="#">Entrar</a></li>
<li><a href="#">Registrar</a></li>
<?php do_action( 'wooc_save_extra_register_fields' ); ?>
</ul>';
}
?>
</div>
任何帮助,看看有什么问题?
答案 0 :(得分:1)
在另一个php
标记内使用php
标记,这是非法的,可以这么说:
echo '<ul class="ent">
<li><a href="#">Entrar</a></li>
<li><a href="#">Registrar</a></li>
<?php do_action( 'wooc_save_extra_register_fields' ); ?>
</ul>';
}
应如下:
echo '<ul class="ent">
<li><a href="#">Entrar</a></li>
<li><a href="#">Registrar</a></li>
' . do_action( 'wooc_save_extra_register_fields' ) . '
</ul>';
}
答案 1 :(得分:1)
我不是wordpress专家但是 代替
import pygame
from pygame.locals import *
T = pygame.display.set_mode((500,500))
M = pygame.image.load("test.jpg")
X = 0
Y = 0
while True:
X += 1
Y += 1
# Other sprites are here which are also redrawn every time loop runs.
# Other code is here too, this is just a little part of it to help explain my problem
T.fill((0,0,0))
T.blit(M,(X,Y))
pygame.display.flip()
使用
echo '<ul class="ent">
<li><a href="#">Entrar</a></li>
<li><a href="#">Registrar</a></li>
<?php do_action( 'wooc_save_extra_register_fields' ); ?>
</ul>';
答案 2 :(得分:1)
{{1}}