0

当使用搜索框时,结果页面上的标题(“您已被提及:”)有一个不需要的超链接,与我手动插入标题的社交媒体超链接之一相同。

我的标题的代码是:

<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">&nbsp;</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 社交媒体链接的超链接,但无法弄清楚原因。

抱歉,如果这是一个冗长的提问方式,但不想错过任何事情。有人有想法么?

如果您需要任何进一步的信息或代码,请询问!

4

1 回答 1

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>

错字:打开 a 标签并关闭 li

于 2013-08-09T19:27:27.150 回答