是否可以使URL仅与单个自定义帖子类型相关?我在make just my custom post type中使用了这两行代码来使用相对URL。
add_filter( \'post_type_link\', \'wp_make_link_relative\' ); // Custom post type link
add_filter( \'post_type_archive_link\', \'wp_make_link_relative\' ); // Post type archive link
这很有效,直到我意识到我的事件如果显示在子域上,就会出现涓流问题,无法正常解决。我的站点有几个不同的映射子域,所以我现在希望缩小add\\u过滤器的范围,使其仅限于我需要的自定义帖子类型,而不是全部。