• Resolved rpuig

    (@rpuig)


    Hello

    I have wpml 4.2.5 and wordpress 5.4.2 with theme wpocean version 1.8.6 . The prolbem is that my home page has links to the categories . I set each caterory link with /index.php?cat= cat_id , as found in the wordpress categories backend page.
    I set a taxonomy translation for spanish, so that I have different cat_id for spanish for each category.

    Strangely when I click on the links to the spanish category page , it brings me back to the home page.

    The category ids exist on the spanish translation and I have posts in those categories so in principle it should show the spanish posts for those categories, instead of bringing me back to the home page.

    Is there a bug in this version that has been solved in newer versions?

    Best regards

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Julien MA Jacob

    (@wpr0ck)

    Hello @rpuig,

    I think you are on the wrong page. We are Weglot, a plugin that allows you to translate a site, with automatic content detection and an automatically generated first translation. I suggest you take a look at our features that you might like if you want to simplify your translation process: https://weglot.com/features/

    Our plugin offers a translation of post type slugs on each edit page, but it is also possible to translate any part of a URL using a hook as follows:

    
    <?php
    
    add_filter( 'weglot_get_option', function( $option, $key, $options ) {
    	
    	if ( 'custom_urls' !== $key ) {
    		return $option;
    	}
    	
    	$option['fr'] = array_merge(array(
    		'categorie' => 'category',
    		'ma-categorie-1' => 'my-1-category-slug',
    		'ma-categorie-2' => 'my-2-category-slug',
    	), $option['fr']);
    	
    	return $option;
    }, 20, 3);
    

    Do not hesitate to try us ^^
    Best,
    https://dashboard.weglot.com/register

Viewing 1 replies (of 1 total)
  • The topic ‘Category link not working in translation’ is closed to new replies.