Advertisement
Guest User

Untitled

a guest
Jun 25th, 2013
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. add_filter('post_type_link', 'k2_post_type_link', 1, 3);
  2. function k2_post_type_link( $link, $post = 0 ) {
  3. $k2_post_types = array('columns', 'downloads', 'apps', 'cool_sites', 'tips', 'buying_buides');
  4. if(in_array($post->post_type, $k2_post_types)) {
  5. return home_url($post->post_type . '/' . $post->ID . '/' . $post->post_name);
  6. } else {
  7. return $link;
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement