girlieworks on "Added a slug "-2" to url alias of pages"

ساخت وبلاگ

When I trying write any numbers as my url alias of page then wordpress adding a slug "-2". Why? Can't I have only numbers in page url alias? Posts all ok. Thanks in advance and sorry for my english.

Do you have a page with that slug already in the Trash? Make sure you don't have any pages with the slug already anywhere.

You'll also have duplicates between pages and posts if you have Permalinks set to post name only.

No. I don't have any pages or posts with same name, trash is empty and my permalinks is /%category%/%postname%.

girlieworks
Member
Posted 3 minutes ago #

Hi, @oxojeck. Using a string of numbers as the slug for a Page can cause its URL to be mistaken for another type of page which already relies on numbers to work (such as a yearly archive).

So, WordPress is adding the -2 to the end of the slug to ensure that the Page can be viewed without any such confusion.

Reference: Trac Ticket #11917

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 312 تاريخ : شنبه 16 مرداد 1395 ساعت: 22:07