サイトには、アーカイブページを有効にしたカスタム投稿タイプがいくつかあります。だから私はすべてがCPTで素晴らしい作品次のURL構造WordpressブログアーカイブURLなしページ
http://example.com/offices/ This is the archive page for office
http://example.com/office/san-fran This is the single page for office
http://example.com/office/new-york This is the single page for office
と
http://example.com/members/ This is the archive page for member
http://example.com/member/john-smith This is the single page for member
を取得します。
ただし、組み込みのpost_type "post"のベースパスを変更しようとしています。私が最初に動作しません
http://example.com/blog/2017/10/post
http://example.com/blog/2017/10/
http://example.com/blog/2017/
しかし
http://example.com/blog/
の世話をする
/blog/%year%/%monthnum%/%day%/%postname%/
にパーマリンク設定を更新しました。いくつかのグーグルの後、私は "ブログ"と呼ばれる空白のページを作成し、設定 - >読書で私の "投稿ページ"として設定しました。それはちょっとうまくいくが、wordpressはアーカイブページとして扱われていないようだ。
post_classesを見ると、オフィスは私がブログの別のCPTの作成について考え、この
class="blog logged-in tribe-no-js app-data index-data home-data"
のようになる。この
class="archive post-type-archive post-type-archive-office logged-in tribe-no-js sidebar-primary app-data index-data archive-data archive-office-data"
やブログのようなものを持っているでしょうが、私は多くが好みますビルドインポストを使用する。投稿用の実際のアーカイブページを作成する方法はありますか?
あなたのテーマは 'archive.php'ファイルを持っていますか?これを見たことがない人は、便利だと思います。https://developer.wordpress.org/files/2014/10/wp-hierarchy.png – admcfajn