• Resolved candy2012

    (@candy2012)


    Hi,

    I have a problem with the tags description which does not translate.
    I have used this code in tag.php:

    <h1><?php single_tag_title(); ?></h1>
    					
    						<?php $description = tag_description(); ?>
    						<div class="tag_descr"><?php echo $description ?>

    The title translates correctly, but the description does not, even though I have added a language specific translation in admin.

    Could you please help?

    Thanks a lot!

Viewing 8 replies - 1 through 8 (of 8 total)
  • maxime

    (@max345)

    Hello

    Does it work if add this filter?

    
    $description = apply_filters( 'sublanguage_translate_term_field', tag_description(), get_queried_object(), 'description' );
    
    
    Thread Starter candy2012

    (@candy2012)

    Hi,

    No, unfortunatelly not :(, just tried it ….

    maxime

    (@max345)

    Can you test with the twenty-sixteen theme and check if the description translates on the tag page?

    Thread Starter candy2012

    (@candy2012)

    Hi,

    It does not translate in twenty either …. 🙁

    maxime

    (@max345)

    well, then there is probably a conflict with another plugin. Can you try to desactivate them one by one ?

    Thread Starter candy2012

    (@candy2012)

    Hi,
    I don’t think the issue is a plugin, I have tried a different WP Install with alsmost no plugins and on Twenty fifteen, and it’s the same issue 🙁

    On the Tags page, the Tag title gets translated but the Tag description does not 🙁

    Any idea how to fix this?

    Thanks a lot!

    Thread Starter candy2012

    (@candy2012)

    Got it 🙂
    The query was not quite right, I used this instead and it works 🙂

    <h1><?php single_tag_title(); ?></h1>
    <div class="tag_descr"><?php $tax = get_queried_object();
      echo  $tax->description;?></div>
    maxime

    (@max345)

    Great!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Problems with Tag description – does not translate’ is closed to new replies.