Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('post_type_link', 'my_custom_public_link',10,2);
- function my_custom_public_link($permalink) {
- // 現在の投稿タイプを取得
- $post_type = get_post_type();
- // 書き換えたい投稿タイプを指定
- if ( $post_type == 'recruit' ){
- $permalink = '表示したいページのURL';
- }
- return $permalink;
- }
Add Comment
Please, Sign In to add comment