Viewing 1 replies (of 1 total)
  • Thread Starter patrikelfstrom

    (@rcane)

    I went thru the code and found this in models/monitor.php:30:

    if ( $post->post_status != 'publish' || is_post_type_hierarchical( $post->post_type ) )
    			return;

    The first bit; If the post_status of the post is not publish don’t create a 301-redirect. Which makes sense since you don’t want users to get redirected to posts that are not public.

    The last bit is something I am more curious about. is_post_type_hierarchical( $post->post_type ) checks wether the post type of the post is a hierarchical one. If it is, don’t create a 301-redirect.

    A regular post is not hierarchical but a page is. So the automatic 301-redirect will only work on posts and not pages.

    Can anyone tell me why it’s like this?

Viewing 1 replies (of 1 total)

The topic ‘"Automatically add a 301 redirection when a post's URL changes" doesn't work’ is closed to new replies.