Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('post_type_link', 'k2_post_type_link', 1, 3);
- function k2_post_type_link( $link, $post = 0 ) {
- $k2_post_types = array('columns', 'downloads', 'apps', 'cool_sites', 'tips', 'buying_buides');
- if(in_array($post->post_type, $k2_post_types)) {
- return home_url($post->post_type . '/' . $post->ID . '/' . $post->post_name);
- } else {
- return $link;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement