Wordpress“阅读更多”按钮

时间:2012-08-14 13:44:03

标签: php html css wordpress

我正在使用My Wordpress Blog。

    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>

我的问题是如何添加图标以阅读更多内容?有没有插件?或者我们可以手动添加吗?请帮我找到解决方案。

1 个答案:

答案 0 :(得分: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路径,然后上传图标。

希望这有帮助。

相关问题