Custom Post Type Permalinks を使用して get_permalinkの出力URLがrewriteされない
-
WordPress: 4.1.1
Custom Post Type Permalinks: 1.0.3・やりたいこと
get_permalink (get_the_permalink) の出力URLを以下のようにしたい。example.com/ターム名/投稿ID/
・taxonomy名: ttt
・登録したterm名: bbb
・Permalinksの設定: /%ttt%/%post_id%/期待するURL: example.com/bbb/7/
現在の出力されるURL: example.com/%ttt%/7/get_permalinkを使わず、自分でURLを組み立てれば、該当の個別記事に飛ぶことは可能です。
code例:
home_url(array_shift(get_the_terms(get_the_ID(), 'ttt'))->slug.'/'.get_the_ID())
正常な結果なのか、bugなのか教えていただけますと幸いです。
別のブラグイン「Rewrite Rules Inspector」でルールを確認すると、Rulesは作成されているようです。よろしくお願い致します。
5件の返信を表示中 - 1 - 5件目 (全5件中)
5件の返信を表示中 - 1 - 5件目 (全5件中)
- トピック「Custom Post Type Permalinks を使用して get_permalinkの出力URLがrewriteされない」には新たに返信することはできません。