我正在写我的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>
我的问题是如何将图标添加到 阅读更多?有没有插件?或者我们可以手动添加这个吗?请帮助我找到解决方案。
您可以像这样向链接添加一个类;
<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 路径,然后上传图标。
希望这有帮助。