Woof removes .html exension
-
Hi,
I am using .html extension because my shop was migrated from old magento.
So SOME of my product categories has .html.
e.g.
https://moda24h.eu/mezczyzna/obuwie-meskie/casual-sneakers.html
The category slug is casual-sneakers.html in this case.But when I use WOOF from its parent category:
https://moda24h.eu/mezczyzna/obuwie-meskie
(left column Podkategorie produktu > Casual,sneakers)
Then plugin cuts .html and causes 404 error.Is there a way the plugin not to erase the .html part?
PS.
The code I use to sanitize:remove_filter( 'sanitize_title', 'sanitize_title_with_dashes'); add_filter( 'sanitize_title', 'restore_raw_title', 9, 3 ); function sweURLtoCHAR($text) { $url=array( "-","-","-","-","-" ); $char=array( "/","%","&",","," " ); $str = str_replace($char,$url,$text); $str_new = str_replace(" ", "", $str); return strtolower($str_new); } function restore_raw_title( $title, $raw_title, $context ) { if ( $context == 'save' ) return sweURLtoCHAR($raw_title); else { $title_new = str_replace(" ", "-", $title); return strtolower($title_new); } }
Regards,
Dominik
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Woof removes .html exension’ is closed to new replies.