2013-08-07 43 views
0

此處http://smallbusinessauthority.com.au/blog/,發佈日期旁邊的作者meta的href顯示爲「[]」。代碼是使用頁腳html標記,如果我刪除了頁腳標記,那麼它工作正常。在wordpress中顯示標籤href的html頁腳標籤不會在[]和側邊欄中單獨顯示

<footer class="entry-meta"> 
         <span class="by-author">By <span class="author vcard"><a class="url fn n" href="http://smallbusinessauthority.com.au/author/admin/" title="View all posts by admin" rel="author">admin</a></span></span> on <a href="http://smallbusinessauthority.com.au/objectives-management-the-key-to-success-for-the-largest-to-the-smallest-businesses-and-what-the-solution-providers-dont-tell-you/" title="8:59 am" rel="bookmark"><time class="entry-date" datetime="2013-07-29T08:59:20+00:00">July 29, 2013</time></a>.     </footer> 

即使在此博客頁面上不顯示側邊欄。每個設置對於側邊欄都是正確的,甚至在文件中正確顯示。

代碼模板文件: 「的風格=」 保證金左:30PX; 「> 」 稱號= 「」 相對= 「書籤」>

<footer class="entry-meta"> 
     <?php if (is_single()) : ?> 
      <?php //twentytwelve_entry_meta(); ?> 
     <?php else : ?> 
      <?php twentytwelve_entry_meta(); ?> 
     <?php endif; ?> 
    </footer><!-- .entry-meta --> 
    </header><!-- .entry-header --> 

    <?php if (is_search()) : // Only display Excerpts for Search ?> 
    <div class="entry-summary"> 
     <?php the_excerpt(); ?> 
    </div><!-- .entry-summary --> 
    <?php elseif (is_single()) : ?> 
    <div class="entry-content" style="padding-bottom:20px; padding-top:0px;"> 
     <?php the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve')); ?> 
    </div> 
    <?php else : ?> 
    <div class="entry-content" style="padding-bottom:20px; padding-top:0px;"> 
     <?php echo substr(get_the_content(), 0 , 300). "...."; //the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve')); ?> 
     <a href="<?php echo the_permalink(); ?>">Read More</a> 
    </div><!-- .entry-content --> 
    <?php endif; ?> 
</article><!-- #post --> 
+0

發佈完整頁面的代碼,以便我們可以看到您正在使用的模板標籤。 – wunderdojo

+0

我把問題的代碼 –

+0

你在迴應the_permalink() - 該函數已經打印出鏈接。如果您使用get_the_permalink(),則只需要回顯它。 http://codex.wordpress.org/Function_Reference/the_permalink – wunderdojo

回答

0

您所描述的問題是由於這些行的c在你的CSS代碼:

footer a[rel=bookmark]:link:after, 
footer a[rel=bookmark]:visited:after { 
    content: " [" attr(href) "] "; /* Show URLs */ 
} 

http://smallbusinessauthority.com.au/wp-content/themes/SBA/style.css?ver=3.5.1)。

它們將[]放在頁腳的周圍。 你可以在你自己的CSS類中覆蓋它,或者如果可以的話刪除它。 基本上將href屬性包含在[]中,並將其作爲鏈接的內容。

有關更多說明,請參閱http://www.quirksmode.org/css/content.html

+0

忘記了關於語氣的東西,側邊欄也沒有到來 –

+0

是什麼問題你是什麼意思吧?它說:'就業 管理 營銷 - 內容營銷 生產力? – putvande

+0

正確的看法是像http://screencast.com/t/DnlIIDEt但不知道它如何得到影響 –