我该如何更改“了解更多"信息?Corporate Plus wordpress主题中的文本和链接? [英] How do I change the "Know More" text and link in Corporate Plus wordpress theme?

查看:53
本文介绍了我该如何更改“了解更多"信息?Corporate Plus wordpress主题中的文本和链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在WordPress上使用名为"Corporate Plus"的主题.

I'm using a theme called "Corporate Plus" on WordPress.

问题是,我想在首页中编辑一个按钮,该按钮显示了解更多",这是一个以'#'为链接的< a> 元素.

The problem is, I want to edit a button in the front page which says "Know More", an <a> element with '#' as a link.

他们没有在主题选项中对其进行编辑的选项,而且我在整个主题文件夹中都找不到了解更多"的任何实例.

They give no option for editing this in the theme options, and I cannot find any instance of 'know more' in the entire theme folder.

如果我打开站点并检查元素,则该项目的CSS将显示在文件路径'index(72)'>索引文件的第72行上.

If I open up the site and inspect element, the CSS for the item is shown to be on the file path 'index(72)' > 72nd line of the index file.

然后我打开查看源代码",并确定在第72行已经足够确定该项目的CSS.

I then open up 'view source' and find that sure enough, on line 72, the CSS for the item is written there.

但是,'know more'文本位于页面文件的最下方,主题文件夹中似乎没有'know more'文本的文件.

However, the text 'know more' is way further down the page file, and there is no file in the theme folder that seems to have a 'know more' text within it.

这是怎么发生的?

如何更改了解更多"文本?

How do I change the 'know more' text?

注意:是的,我正在使用免费版本,这就是为什么我要问这个问题.所以不要告诉我升级.升级会在信息中心的自定义"部分提供选项.

Note: Yes I'm using the free version, that's why I ask the question. So don't tell me to upgrade. Upgrading gives the option in the 'customize' section of the dashboard.

推荐答案

根据您的主题自定义,您可以尝试将其添加到活动子主题或主题中的 function.php 文件中:

Depending on your theme customization, you could try to add this in function.php file located in your active child theme or theme:

function custom_excerpt_more($more) {
    global $post;
    return '<a class="moretag" href="'. get_permalink($post->ID) . '">' . __("Your Read More Link Text", "your_theme_slug") . '</a>';
}
add_filter( 'excerpt_more', 'custom_excerpt_more' );

WP Codex:自定义更多信息

这篇关于我该如何更改“了解更多"信息?Corporate Plus wordpress主题中的文本和链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆