spmakingwp
Forum Replies Created
-
Perfect, problem solved.
Thank you very much Dennis, excellent support.
Hi, thanks for your response.
I added the following code and it works perfect for switching from English to Spanish:
———————–
function my_msls_options_get_permalink( $url, $language ) {
if ( ‘es_ES’ == $language ) {
$url = str_replace( ‘/shop/’, ‘/tienda/’, $url );
}
return $url;
}
add_filter( ‘msls_options_get_permalink’, ‘my_msls_options_get_permalink’, 10, 2 );
——————————–But adding the following, to switch from Spanish to English, it gives me an error.
————————————–
function my_msls_options_get_permalink( $url, $language ) {
if ( ‘en_US’ == $language ) {
$url = str_replace( ‘/tienda/’, ‘/shop/’, $url );
}
return $url;
}
add_filter( ‘msls_options_get_permalink’, ‘my_msls_options_get_permalink’, 10, 2 );
————————————–I studied and tried various ways, but I don’t know how to add both.
Link to the English version: https://ruizbazan.com/rugs/shop/
Link to the Spanish version: https://ruizbazan.com/tienda/
- This reply was modified 5 years, 9 months ago by spmakingwp.
Update:
New link: https://ruizbazan.com/tienda
The problem may be in ‘Rewrites Settings’, with the automatic capture of ‘Products Slug’
There’s no problem with the database, we tried another installation and it gave the same error.