Hi i'm trying to use rewrite rules to combine 2 taxonomy with a pretty url but in toolset it doesn't work
Is there any knowed conflict issue for this?
I have two taxonomies
1 tipo
2 zona
I want to combine them like this
hidden link
i used this code
function custom_rewrite_rules() {
add_rewrite_rule('^tipo/(.*)/zona/(.*)?', 'index.php?tipo=$matches[1]&zona=$matches[2]', 'top');
}
add_action('init', 'custom_rewrite_rules');
but it doesn't work
Hello, I'm not aware of any known conflict like this but typically we do not support custom rewrites or permalink structures in the forum. Toolset's CPT and archive URL structures adhere to WordPress standards, and any other permalink structures require custom code. You mentioned that it does not work in Toolset - are you saying that this rewrite rule works for custom taxonomies created outside of Toolset, using custom code for example?
Hi Christian,
i used toolset to create taxonomies so if needed i can try another plugin to emulate and let you know.
But i tried to modify permalink structure many times and I deduced that is doesn't work for toolset because i try simple common code to rewrite urls
But i tried to modify permalink structure many times and I deduced that is doesn't work for toolset
Yes you are correct, Toolset does not allow you to create custom taxonomy permalink structures using the combined multiple-taxonomy format you described. It would require custom code that falls outside the scope of support we provide here in the forums.
Yes Christian, that's exactly what i did: custom code.
For this reason i would know about rewrite rules urls incompatibilty. I tried many times in various scenarios to implement this feature but It didn't work, so i supposed about some toolset bug about this
Right, and as I said, I am not aware of any bug or known issue with rewrite rules, but it is possible. If there is a bug, we should investigate it and fix it in Toolset. Sorry if I was not clear, let me clarify what I need from you. I need you to show me exactly how this is a bug. To prove it is a bug, I need you to show me your custom code working correctly with a custom taxonomy created outside of Toolset. Does this make sense? If you show me the custom code working correctly without Toolset, I can explain the problem to my 2nd tier support team for further investigation.
Ok Christian, i'll try like this thank.
In the while, because you helped me in the past with the code can i take this opportunity to ask you about a toolset code integration ?
I would help to integrate a shortcode to order posts based on a custom field. I Would create a view in a location cpt to sort nearest location(s) to that.
I have split your new request into a new ticket.