wordpress页脚修改
Do you want to remove the powered by WordPress footer links on your site? Recently one of our readers asked if it was possible to remove footer credits in WordPress themes. In this article, we will show you how to remove the powered by WordPress footer links in your themes.
您是否要删除网站上由WordPress提供支持的页脚链接? 最近,我们的一位读者询问是否可以删除WordPress主题中的页脚信用。 在本文中,我们将向您展示如何在主题中删除由WordPress页脚链接提供支持的功能。
The default WordPress themes use the footer area to display the “Proudly powered by WordPress” link. Many theme developers take this further and add their own credits, so it looks something like “Powered by WordPress. Theme by Company Z”.
默认的WordPress主题使用页脚区域显示“自豪地由WordPress驱动”链接。 许多主题开发人员对此进行了进一步扩展并添加了自己的功劳,因此看起来像“由WordPress提供支持”。 Z公司的主题”。
But if you’re running a business website, then it doesn’t make any sense to display these credits. Some even think that it makes your website look unprofessional.
但是,如果您经营的是商务网站,那么显示这些信用就没有任何意义。 甚至有人认为这会使您的网站看起来不专业。
删除WordPress页脚信用链接是否合法? (Is it legal to remove WordPress footer credit links?)
We get this question a lot. Yes, it is absolutely legal to remove footer credits link on your WordPress site.
我们经常听到这个问题。 是的,删除WordPress网站上的页脚积分链接绝对合法。
WordPress is free, and it is released under the GPL license.
WordPress是免费的 ,并且根据GPL许可发布。
In short, that license gives you the freedom to use, modify, and even redistribute WordPress. Any WordPress theme or plugin that you download from the official WordPress.org directory, and even most commercial WordPress themes are also released under the same license.
简而言之,该许可使您可以自由使用,修改甚至重新分发WordPress。 您从官方WordPress.org目录下载的任何WordPress主题或插件,甚至大多数商业WordPress主题也都以相同的许可证发布。
So you have full rights to do what you please with your website including removing the footer credit links.
因此,您拥有使用您的网站进行操作的完整权利,包括删除页脚功劳链接。
Let’s take a look at how to customize your WordPress footer and remove these credit links.
让我们看一下如何自定义WordPress页脚并删除这些信用链接。
影片教学 (Video Tutorial)
演示地址
If you don’t like the video or need more instructions, then continue reading.
如果您不喜欢该视频或需要更多说明,请继续阅读。
删除由链接驱动的WordPress (Removing WordPress Powered by Links)
There are many ways to remove the WordPress footer credit links, but we only recommend the following 2 ways of doing this.
删除WordPress页脚信用链接的方法有很多,但我们仅推荐以下两种方法。
The Theme Settings Page
主题设置页面
Most good theme authors know that their users want to have the option to remove footer credit links. That’s why they make it available in their theme settings area.
大多数优秀的主题作者都知道其用户希望选择删除页脚信用链接。 这就是为什么他们在主题设置区域中提供该功能。
Different themes have this setting available under different sections. But the first place to start looking is inside the WordPress theme customizer (Appearance Customize).
不同主题的此设置在不同部分下可用。 但是首先要查找的地方是WordPress主题定制器(AppearanceCustomize) 。
For example, the GetNoticed theme by Michael Hyatt give users the option to customize the footer text as well as disable the credit links.
例如,迈克尔·凯悦(Michael Hyatt)的GetNoticed主题为用户提供了自定义页脚文本以及禁用功劳链接的选项。
Other places that you can look are individual theme’s options pages or inside the Widgets section.
您可以看到的其他地方是各个主题的选项页或“小部件”部分中。
Footer.php Code Method
Footer.php代码方法
If your theme does not have the option to remove or modify footer credits from WordPress admin, then your only option is to edit the footer.php code.
如果您的主题没有从WordPress管理员中删除或修改页脚积分的选项,那么您唯一的选择是编辑footer.php代码。
You can find this file in your /wp-content/themes/yourtheme/footer.php
您可以在/wp-content/themes/yourtheme/footer.php中找到此文件
Simply open this file in a text editor and search for the footer credit text like “Powered by”, and it will show you the section that you need to remove.
只需在文本编辑器中打开此文件,然后搜索诸如“ Powered by”之类的页脚功劳文本,它将向您显示您需要删除的部分。
In the default Twenty Sixteen theme for WordPress, the code looks like this:
在WordPress的默认26主题中,代码如下所示:
<div class="site-info">
<?php
/**
* Fires before the twentysixteen footer text for footer customization.
*
* @since Twenty Sixteen 1.0
*/
do_action( 'twentysixteen_credits' );
?>
<span class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?></a>
</div><!-- .site-info -->
You can either remove this text entirely or customize it to suit your needs.
您可以完全删除此文本,也可以根据需要对其进行自定义。
不惜一切代价避免使用CSS方法 (Avoid the CSS Method at All Cost)
Now some WordPress tutorial sites may show you a CSS method that uses display: none to hide the footer credit links.
现在,某些WordPress教程网站可能会向您显示使用displayCSS方法:没有一种方法可以隐藏页脚信用链接。
However doing so will put your site’s SEO at risk. Google does not like hiding links with display:none because that’s a technique that spammers use to hide the links from users while still showing it to Google (in hopes of higher rankings).
但是,这样做会使您网站的SEO面临风险。 Google不喜欢隐藏带有display:none的链接,因为这是垃圾邮件发送者用来隐藏用户链接的技术,同时仍向Google显示链接(希望获得更高的排名)。
Your site might get flagged, and it will cause you to lose your search engine rankings.
您的网站可能会被举报,这将导致您失去搜索引擎排名。
So whatever you do, do not use the CSS method like this:
因此,无论您做什么,都不要像这样使用CSS方法:
#site-info {display:none}
While it looks simple, it’s not good for SEO.
虽然看起来很简单,但对SEO不利。
We strongly recommend using the two methods that we showed above. If you cannot do either of those, then we recommend hiring a professional to help you remove your footer credit links or even consider changing your WordPress theme.
我们强烈建议使用上面显示的两种方法。 如果您不能执行任何一项操作,那么我们建议您聘请专业人士来帮助您删除页脚信用链接,甚至考虑更改WordPress主题 。
We hope this article helped you remove the powered by WordPress footer links. You may also want to check out our guide on how to improve your WordPress security.
我们希望本文能帮助您删除由WordPress页脚链接提供支持的功能。 您可能还需要查看有关如何提高WordPress安全性的指南 。
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在Twitter和Facebook上找到我们。
翻译自: https://www.wpbeginner.com/wp-themes/how-to-remove-the-powered-by-wordpress-footer-links/
wordpress页脚修改