简体   繁体   English

WordPress:在不弄乱主题的情况下更改“旧帖子”样式

[英]Wordpress: Change “older posts” style without messing the theme

In my blog, the text that says "Older posts" is written in gray, and very invisible. 在我的博客中,“旧帖子”的文字是灰色的,非常不可见。 I would like to change its style. 我想改变它的风格。

I can do that through the php files, but then, every time I update the theme, I'll have to redo that. 我可以通过php文件来完成此操作,但是,每次更新主题时,都必须重做一次。 So I need a way to do it in a way that makes it independent of updates. 因此,我需要一种使其独立于更新的方式来执行此操作。

Thank you for any efforts. 谢谢您的努力。

You can install the plugin http://wordpress.org/plugins/my-custom-css/ And Add the CSS code for the pagination. 您可以安装插件http://wordpress.org/plugins/my-custom-css/并添加分页的CSS代码。 If you have google chrome just right click over the Older Posts Inspect Element See the CSS class used by it and add the CSS code for that class in the Plugin after installation. 如果您拥有google chrome,则只需右键单击“较早的帖子”检查元素,查看其使用的CSS类,并在安装后在插件中添加该类的CSS代码。

You should be able to style the link with CSS but it is difficult to show you without any code segments provided in your question. 您应该能够使用CSS设置链接的样式,但是如果您的问题中没有提供任何代码段,很难向您展示。

If you use chrome developer tools, simply click on the element, find its class name and reference it in your style sheet. 如果您使用chrome开发人员工具,只需单击该元素,找到其类名,然后在样式表中对其进行引用。

I've provided an example below which is taken from another wordpress theme, but I cant guarantee it will be the same as your own: 我在下面提供了一个示例,该示例取自另一个wordpress主题,但我不能保证它会与您自己的主题相同:

<div class="post-more">
   <span class="read-more"><a title="Read more" href="http://www.website.com">Read more</a></span>
</div>

The CSS: CSS:

.post-more a {
color: #000000;  /*New Colour*/
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM