Whenever I update a WP-Types custom post that has another WP-Types custom post as a child, Yoast SEO Premium Creates a redirect from the parent post to the child post.
Not sure where to even begin understanding why this is happening, but it is a serious problem.
Yoast SEO is a very popular plugin, so simply de-activating it is not an option.
I found this: hidden link, but I am not sure if this is a solution or a patch. If this code could somehow be included under an option within the types plugin, so that we can opt to disable automatic redirection for child posts or custom posts, that would be awesome.
I am running multiple sites on one theme, and not all of them are using WP-Types so adding that filter is not an option for me.
Please advise
Dear Adrian,
I assume we are talking about a compatibility problem between Types plugin and the "Yoast SEO Premium" plugin, there isn't such a built-in feature within Types plugin:
If this code could somehow be included under an option within the types plugin, so that we can opt to disable automatic redirection for child posts or custom posts.
If you agree, we can take it as a feature request, our developers will evaluate it.
Currently, I suggest you use PHP codes to do this:
1) Use WordPress function get_current_blog_id() to get the current sub site ID:
https://codex.wordpress.org/Function_Reference/get_current_blog_id
2) Check the current sub site ID, and Disable Automatic Redirects of "Yoast SEO Premium" plugin
I'd rather write a plugin that I activate as needed. But this plugin is doing something that does not follow best practices which is confusing the Yoast Plugin. It only seems to be occurring with parent-child relationships between posts (so parent posts that have child posts).
I wanted to let you know, as this may cause issues with other plugins too.
Thanks for the feedback, we did not receive similar conflict problem with other plugins, and it would be great that if you can share the custom plugin for this issue.
It is the Yoast SEO Premium Plugin. Version 5.0
Not sure where I could upload the Plugin files but I'd be happy to.
A temporary workaround was to edit the post type and under the Children Post Types section click on "select fields" and from the pop-up window select "Do not show management options for this post type".
However this adds a ton of complexity to the client for adding floor plans to a listing for example, as now they have to go and manage the floor plans individually and it creates a huge mess.
Yoast is a very popular plugin, and I am positive you will run into this issue in the future.
The automatic redirect feature detects when I change the URL of the page and automatically creates a 301 redirect.
I believe the something in the linking of the Child post management box within the Edit screen is confusing Yoast's plugin making it think that the Parent Post is now redirected to the Child Post.
If as a last resort you could find a way to disable yoast's automatic redirect feature just for WP-Types Custom Posts, that would be amazingly helpful.
You can put your own custom plugin (which is for fix the compatibility problem between "Yoast SEO Premium" Plugin and Types plugin) into github
hidden link
and share the URL here.
Yes, since it isn't a built-in feature of Types plugin, if you agree, we can take it as a feature request, our developers will evaluate it.