2
0

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.

固定ページのパーマリンクとタクソノミーの名前がかぶって固定ページ表示できず

Posted at

Wordpressでとある固定ページが表示されない事案が発生した。

原因を調べるに、どうやら固定ページで利用しているパーマリンクの名称と、タクソノミーの名称がかぶってるせいで、該当URLがうまく固定ページまでたどり着けてない模様

タクソノミーを定義している箇所で(おおよそfunction.php内)

register_taxonomy(
		'hoge',
		'post',
		array(
-			'rewrite' => array( 'slug' => 'hoge' )
+			'rewrite' => array( 'slug' => 'not_hoge' )
		)
	);

とすることで、タクソノミーのurlに使われるslugを変更することで解消できた。

WordPress難しい。。。

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?