博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
wordpress标签分类_在WordPress中更改类别标签
阅读量:2523 次
发布时间:2019-05-11

本文共 2529 字,大约阅读时间需要 8 分钟。

wordpress标签分类

When I first started this blog, I set the category "slug" to "sugar."  Why sugar?  Because a lot of a good thing is candy;  thus, a bunch of MooTools tutorials is as sweet as sugar.  While I get a giggle out of calling my categories sugar, Google doesn't find it nearly as funny, nor does Yahoo or Bing.  In an effort to increase my SEO, I wanted to change my category slug to "tutorials."  That's where the awesome Redirection plugin and a simple regular expression comes into place.

当我第一次创建此博客时,我将类别“ slug”设置为“ sugar”。 为什么加糖? 因为糖果是很多好处。 因此,一堆MooTools教程就像糖一样甜。 虽然我笑称我的类别是糖,但Google却发现它几乎没有那么有趣,雅虎或Bing也没有。 为了增加我的SEO,我想将类别标签更改为“教程”。 那就是很棒的重定向插件和一个简单的正则表达式的地方。

改变弹头 (Changing the Slug)

You can very easily change the category slug within WordPress's admin panel by navigating to Settings >> Permalinks:

您可以通过导航到“设置” >>“永久链接”,轻松地在WordPress管理面板中更改类别标签。

WordPress Category

I changed the slug from "sugar" to "tutorials."

我将弹头从“糖”更改为“教程”。

WordPress重定向 (WordPress Redirection)

So why do we need the ?  Because search engines like Google and users who have bookmarked your site will try to reach the old address.  Thus, we need an appropriate redirect to push them to the new address.  Not only do we need a redirection plugin but we need it to be reliable.  I've been using Redirection for years so I knew this would be the best route.

那么,为什么我们需要 ? 因为像Google这样的搜索引擎以及为您的网站添加了书签的用户都将尝试访问原来的地址。 因此,我们需要适当的重定向以将其推送到新地址。 我们不仅需要重定向插件,而且还需要它可靠。 我已经使用重定向多年了,所以我知道这是最好的方法。

While Redirection allows you to make a simple URL to URL redirection, I needed something a bit more powerful since almost anything could be after "/sugar/" in the URL.  What I did was use Redirection's regular expression capabilities to create a wildcard search on the URL to redirect all "/sugar/" URLs to "/tutorials/" URLS:

虽然重定向使您可以进行简单的URL到URL重定向,但我需要更强大的功能,因为URL中的“ / sugar /”之后几乎都可以包含任何内容。 我所做的是使用重定向的正则表达式功能在URL上创建通配符搜索,以将所有“ / sugar /” URL重定向到“ / tutorials /” URL:

 WordPress Redirection

And there I have it;  all category URLs are redirected as they should be! The (*) in the source URL grabs the text after "/sugar/" in the URL and the $1 in the Target URL places that text after the new category slug!

我在那里 所有类别的URL均应重定向! 源URL中的(*)捕获URL中“ / sugar /”之后的文本,目标URL中的$1将该文本放置在新类别标签之后!

The Redirection plugin for WordPress is outstanding.  As I mentioned above, I've used it for years, have hundreds of redirections in place, and it's always been one of my most trusted plugins.  Thanks to for his great plugin!

WordPress的重定向插件非常出色。 正如我上面提到的,我已经使用了多年,已经进行了数百次重定向,并且它一直是我最信任的插件之一。 感谢的出色插件!

翻译自:

wordpress标签分类

转载地址:http://dcpwd.baihongyu.com/

你可能感兴趣的文章
laravel连接sql server 2008
查看>>
Laravel框架学习笔记之任务调度(定时任务)
查看>>
Swagger在Laravel项目中的使用
查看>>
Laravel 的生命周期
查看>>
Nginx
查看>>
Navicat远程连接云主机数据库
查看>>
Nginx配置文件nginx.conf中文详解(总结)
查看>>
jxl写入excel实现数据导出功能
查看>>
linux文件目录类命令|--cp指令
查看>>
.net MVC 404错误解决方法
查看>>
linux系统目录结构
查看>>
git
查看>>
btn按钮之间事件相互调用
查看>>
Entity Framework 4.3.1 级联删除
查看>>
codevs 1163:访问艺术馆
查看>>
冲刺Noip2017模拟赛3 解题报告——五十岚芒果酱
查看>>
并查集
查看>>
sessionStorage
查看>>
代码示例_进程
查看>>
Java中关键词之this,super的使用
查看>>