4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WordPress:数字だけのパーマリンクに「-2」がつく問題を解消する裏技

Posted at

WordPressパーマリンク設定で「投稿名」にすると、記事のパーマリンクを自由に設定できるが、「900」のような数字だけのパーマリンクは必ず「-2」がついて「900-2」のようなURLになってしまう。

新規投稿を追加_‹_test_—_WordPress.png

この問題を解決する裏技を紹介する。

まず、「パーマリンク設定」を「基本」にしておく。

パーマリンク設定_‹_test_—_WordPress.png

次に、記事タイトルをパーマリンクにしたい番号にして「公開」しておく。

新規投稿を追加_‹_test_—_WordPress.png

記事を公開したら、再び「パーマリンク設定」に行き「投稿名」に設定変更する。

パーマリンク設定_‹_test_—_WordPress.png

その後、数字タイトルで投稿した記事にいくと、パーマリンクが「-2」なしのURLになっている。
なお、その記事はタイトルを変更してもパーマリンクは変わらることがない。

投稿の編集_‹_test_—_WordPress.png
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?