lundi 5 octobre 2015

post_type_link filter Post ID Twice

add_action('post_type_link','myfun');
function myfun($link,$post){
  if('MYPOSTTYPE' == get_post_type($post)){
     $link = $link.$post->ID.'/';
    }
  return $link;
}

Now when I access

http://ift.tt/1L2sNsI

It Redirects me to

http://ift.tt/1L2sL41

Why is this happening? If I disable this hook then the URL remains.

http://ift.tt/1VzyhFD



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire