admin管理员组文章数量:1125092
I would like to create a page on wordpress with this URL: /
However, it seems that the slug /landing-page/ has already been created in the past because it does not return a "404 Page not found" error but redirects to the home page: /
When I try to create a page with the following Url: / wordpress generates a new page with a -2 at the end of the slug.
( Next Url: /)
This is something I absolutely want to avoid.
I've searched all my pages, articles and media to see if an element links to / but I've found absolutely nothing. I don't have any pages in the trash. I didn't have a category with the same name as my page.
I purged the cache in the LiteSpeed cache plugin and that didn't work.
However, I've just noticed something strange:
I've tried to create a post (and not a page as previously tried) and wordpress generates the url I want: /
However, when I click on "Edit with oxygen" to edit the page, it sends me to the oxygen editing interface on the site's home page: /
I've modified the page to check which URL the interface modifies and it's the home page it's modifying: /
Can you help me find a solution?
Thank you!
I would like to create a page on wordpress with this URL: https://my-website.org/landing-page/
However, it seems that the slug /landing-page/ has already been created in the past because it does not return a "404 Page not found" error but redirects to the home page: https://my-website.org/
When I try to create a page with the following Url: https://my-website.org/landing-page/ wordpress generates a new page with a -2 at the end of the slug.
( Next Url: https://my-website.org/landing-page-2/)
This is something I absolutely want to avoid.
I've searched all my pages, articles and media to see if an element links to https://my-website.org/landing-page/ but I've found absolutely nothing. I don't have any pages in the trash. I didn't have a category with the same name as my page.
I purged the cache in the LiteSpeed cache plugin and that didn't work.
However, I've just noticed something strange:
I've tried to create a post (and not a page as previously tried) and wordpress generates the url I want: https://my-website.org/landing-page/
However, when I click on "Edit with oxygen" to edit the page, it sends me to the oxygen editing interface on the site's home page: https://my-website.org/
I've modified the page to check which URL the interface modifies and it's the home page it's modifying: https://my-website.org/
Can you help me find a solution?
Thank you!
Share Improve this question asked Feb 13, 2024 at 15:51 user239943user239943 32 bronze badges 1- 1 are you sure it's not in the trash? Or that it's not been set as the slug for the page that's set as the homepage? Note that oxygen builder is offtopic here as are all 3rd party plugin – Tom J Nowell ♦ Commented Feb 13, 2024 at 16:54
1 Answer
Reset to default 1It might not be a Page. WordPress is very picky about slugs sometimes. You might have to dig in the database's wp_posts
table and see what other post exists somewhere with that name - sometimes it can be an odd thing like a Media Library (image) file.
Once you find it, if you completely delete it - preferably through wp-admin so all its postmeta gets deleted too - you should then be able to publish a new Page (which is also going to be in the wp_posts
table) with the slug you want, without WP adding the "-2".
本文标签: WP appending 2 to the end of my slug
版权声明:本文标题:WP appending -2 to the end of my slug 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736652480a1946174.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论