Badly URL for month view in multi language site
-
Hi!
We are using your awesome plugin in our multi language site, and we had to apply a patch to fix some badly formed URLs in the buttons to switch between list view and month view.
Badly formed URLs look like this:
domain.tld/(<iso-lang-code>)/events-slug/list
domain.tld/(<iso-lang-code>)/events-slug/month
And we make this fix:
function impeka_child_tribe_rewrite_canonical_url ( $resolved ) {
$pattern = ‘/\([A-Za-z0-9]+\)\//i’;
return preg_match( $pattern, $resolved ) === 1 ? preg_replace( $pattern, NULL, $resolved ) : $resolved;
}
add_filter( ‘tribe_rewrite_canonical_url’, ‘impeka_child_tribe_rewrite_canonical_url’ );To remove the
(<iso-lang-code>)/
part.Our kernel, theme and plugins are up to date, and we are currently using Polylang for multi language support.
Is this a bug, maybe?
Grettings!
The page I need help with: [log in to see the link]
- The topic ‘Badly URL for month view in multi language site’ is closed to new replies.