我可以在 Wordpress Multisite 中将/blog/slug 更改为 somthing elase 吗? [英] Can I change the /blog/ slug to somthing elase in Wordpress Multisite?

查看:22
本文介绍了我可以在 Wordpress Multisite 中将/blog/slug 更改为 somthing elase 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 wordpress 多站点 URL 的/blog/slug 有问题.我可以把这个 slug 换成别的东西吗?

I have an issue with the /blog/ slug of my URLS of wordpress multisites. Can I change this slug to something else?

推荐答案

第一种方法:(使用 buddypress 可能会失败)

First Method : ( Might fail with buddypress )

在站点 <代码>设置 ->永久链接 ->通用设置 ->默认(必须只选择默认,不要动任何东西,如果你需要改变类别库,只在网络管理员设置标签库)

At site Settings -> Permalinks -> Common Setting -> Default ( Must select default only and don't touch any thing, If you need to change category base, tag base set at Network Admin only )

Network Admin -> Sites -> (root site) Permalink Sturcture -> /%category%/%post_id%

您也可以只尝试 %post_id%.

第二种方法:

转到 http://domain.com/wp-admin/options.php ->永久链接结构

默认值应该是 /blog/%year%/%monthnum%/%postname%/

手动将值更改为任何值.

Change the value manually to whatever.

/whatever/%year%/%monthnum%/%postname%/ 

 /%year%/%monthnum%/%postname%/

访问http://domain.com/wp-admin/options-permalink.php 但这次不要保存更改以刷新重写规则.(如果你保存它会再次默认)

Visit http://domain.com/wp-admin/options-permalink.php but this time DO NOT save changes in order to flush the rewrite rules. ( If you will save it will default again )

其中一种方法应该可行,具体取决于您的 WP 版本.还有 - 还有其他方法可以通过重写规则和代码来做到这一点 - 但我认为最好(也更安全)首先使用上述那些..)

One of the methods should work, depending on your WP version. also - there are other ways to do it with rewrite rules and code - but I think that it is better ( and safer ) to use those stated above first ..)

这篇关于我可以在 Wordpress Multisite 中将/blog/slug 更改为 somthing elase 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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