当使用搜索框时,结果页面上的标题(“你在上面提到过:”)中有一个不需要的超链接,与我手动插入标题的社交媒体超链接之一相同。
我标题的代码是:
<body <?php body_class() ?>>
<div id="container">
<div class="wrapper">
<div id="header">
<div id="logo"><h1>
<img src="/uploads/2013/08/LogoSpaced40.png" alt="Tell Him Her" />
</h1>
</div><!-- / #logo -->
<div id="menu" class="dropdown">
<?php wp_nav_menu( array('container' => '', 'container_class' => '', 'menu_class' => 'dropdown', 'menu_id' => 'nav', 'sort_column' => 'menu_order', 'theme_location' => 'primary' ) ); ?>
</div>
<div class="cleaner"> </div>
<?php if ( function_exists( 'get_smooth_slider' ) ) { get_smooth_slider(); } ?>
<div id="twitter_icon">
<a href="http://twitter.com/###" target="_blank" alt="Twitter"><img src="/uploads/2013/06/64x64-twitter.png" /></li></div>
<div id="facebook_icon">
<a href="http://facebook.com/###" target="_blank" alt="Facebook"><img src="/uploads/2013/06/64x64-facebook.png" /></li></div>
</div><!-- end #header -->
</div><!-- end .wrapper -->
社交媒体链接的CSS是:
#twitter_icon {
position: relative;
float: right;
margin-top: -155px;
margin-right: 12px;
}
#facebook_icon {
position: relative;
float: right;
margin-top: -75px;
margin-right: 12px;
}
相关搜索结果代码为:
$output = '<div class="searc-output-comments">';
if(count($commenters) != 0) {
$output .= '<div class="fixtitle1">You have been mentioned in:</div>';
}else{
$output .= '<div class="fixtitle1">You have not been mentioned. Maybe you should mention someone yourself...</div>';
}
$cc = 1;
if ($paged > 1) $cc = ($count * $paged) - ($count -1);
for ($i = $start; $i < $end; $i++){
$comment = $commenters[$i];
$permalink = get_permalink( $comment['comment_post_ID'] );
$output .= '<div class="output-post">';
$output .= ' <div class="postcounter">'.$cc.'</div>';
$output .= ' <div class="s-p-wrap">';
$output .= ' <div class="s-p-w-top">';
$output .= ' <span class="author-name"><a href="'.$permalink.'#comment-'.$comment['comment_ID'].'">'.$comment['comment_author'].'</a></span>';
$output .= ' <div class="comment-date">'.time_ago($comment['comment_date']).'</div>';
$output .= ' </div>';
$output .= ' <div class="s-p-w-bottom">';
$output .= ' <p>'.$comment['comment_content'].'</a></p>';
$output .= ' </div>';
$output .= ' </div>';
$output .= '</div>';
$cc++;
}
基本上是代码:
$output .= '<div class="fixtitle1">You have been mentioned in:</div>';
}else{
$output .= '<div class="fixtitle1">You have not been mentioned. Maybe you should mention someone yourself...</div>'
从Facebook社交媒体链接显示超链接,无法找出原因。
很抱歉,如果这是一个冗长的问题,但不想错过任何问题。有人有什么想法吗?
如果您需要任何进一步的信息或代码,请询问!
答案 0 :(得分:0)
<div id="twitter_icon">
<a href="http://twitter.com/###" target="_blank" alt="Twitter"><img src="/uploads/2013/06/64x64-twitter.png" /></li></div>
<div id="facebook_icon">
<a href="http://facebook.com/###" target="_blank" alt="Facebook"><img src="/uploads/2013/06/64x64-facebook.png" /></li></div>
错字:打开标签并关闭li