我有一个wordpress生成的页面,我需要一些帖子(在特定类别中)才能有一个"注册"按钮.但是,当我加入调理代码,在此发现helpsheet,页面只是显示了这个错误:
"解析错误:语法错误,意想不到的'<’在/home006/sub008/sc74101-DVGF/gadebold.dk/wp-content/themes第9行的/gadebold/single.php'
我将调节代码放在循环中(在single.php中),如下所示:
if ( is_category('8') ) {
<div id="tilmeldknap">
<form method='post' action='<?php echo site_url('/events/tilmeld-hold/')?>'>
<input name="event" type="hidden" value="<?php echo the_title() ?>" />
<input type="submit" name="tilmeld" value="Tilmeld Hold" /></form></div>
<?php } else { ?>
<?php } ?>
Run Code Online (Sandbox Code Playgroud)
从php-tag ofc开始.因为我无法让代码显示在它面前.
我在这个片段中做错了什么?
我在缩略图上使用以下代码作为悬停函数:
$(function (){
$('.button').hover(function() {
if ($(this).is(":not(animated)")) {
$(this).animate({opacity: 0.7}, 'fast');
}
},
function() {
$(this).animate({opacity: 1}, 'fast' );
});
});
Run Code Online (Sandbox Code Playgroud)
问题是,当我过快地翻过拇指时,效果会持续闪烁一段时间...有什么东西我可以添加到if块来防止这种情况吗?