1

i'm using polylang to translate my blog site along with loco translate. i'm manually adding string translations which was working fine with get_theme_mod parts, but there is a place that i want to also add custom string translation, after i add manually it breaks html and css won't work then.

it should be seen like this after adding custom string translation ; works fine without pll_e

but after i add pll_e to the that part in index.html ;

<?php get_header(); ?>

<div class="content">
    
    <?php if ( get_theme_mod('heading-enable','on') == 'on' ) : ?>
      <?php echo get_template_part(pll_e ('inc/page-title') ); ?>
    
    <?php endif; ?>

it breaks the html but translation works. its seen like this ; looks like this

does anyone knows the solution ? i think its about get_template_part and get_theme_mod because the same things that i've done with get_theme_mod parts works fine.

by the way there is difference like this with pll_e and without it.

without pll_e with pll_e

1 Answers1

1

i solved the problem by editing index.html like this ;

<div class="content">

<div class="page-title group">
<div class="page-title-inner group">

                <?php if ( get_theme_mod('heading-enable','on') == 'on' ) : ?>
    <h2> <?php echo get_template_part(pll_e('inc/page-title') ); ?>  </h2>

<?php endif; ?>
    
                            
</div><!--/.page-title-inner-->