2012-08-14 246 views
0

我正在我的WordPress的博客。WordPress的「閱讀更多」按鈕

the_excerpt(); & 
<a href="<?php the_permalink(); ?>">Read more</a> 

如果我給WordPress的標準可以添加像「閱讀更多」的摘錄帖子。 我的代碼如下所示:

<a href="<?php the_permalink() ?> 
    "rel="bookmark" title="Read more on 
    <?php the_title_attribute(); ?>"><?php the_title(); ?></a> 

我的問題是如何添加一個圖標來了解更多?有沒有插件?或者我們可以手動添加這個?請幫我找到一個解決方案。

+0

你想刪除標題並添加圖標? – 2012-08-14 13:53:19

+0

這是一個更適合WordPress的堆棧交易http://wordpress.stackexchange.com/ – dnagirl 2012-08-14 13:56:52

+0

yha我想刪除標題並添加一個圖標... – Jerushan 2012-08-14 14:00:25

回答

5

你會像這樣向鏈接添加一個類;

<a class="readmore" href="<?php the_permalink() ?>" rel="bookmark" title="Read more on <?php the_title_attribute(); ?>"></a> 

然後你會使用CSS將你的圖標應用到該類,如此;

a.readmore { 
width: 20px; 
height: 20px 
display: block; 
background: url(../images/myicon.png) no-repeat 0 0; 
} 

這些都是例子,你將取決於它是相對於你的樣式表的URL路徑更改爲你的圖片文件夾,你會上傳您的圖標。

希望這會有所幫助。

+0

我更新了我的答案根據您的評論 - the_title( ) 已移除。 – McNab 2012-08-14 14:04:07

+0

謝謝.. ive明白了..:D – Jerushan 2012-08-14 14:04:09

相關問題