Skip Navigation

[Resolved] Rewrite Rules conflicts ?

This support ticket is created 4 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 2 voices.

Last updated by Christian Cox 4 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1551179

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

#1551599

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?

#1553293

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

#1554103

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.

#1554115

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

#1554121

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.

#1559613

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.

New threads created by Christian Cox and linked to this one are listed below:

https://toolset.com/forums/topic/shortcode-to-sort-posts/

#1561815

I have split your new request into a new ticket.