Div is not being displayed on site

Posted in: Newspaper
Post count: 8

I’ve added this code for my multilingual switcher, next to the search bar, but it’s not being displayed at all (this div even doesn’t appear in the source code). What should I do?

<div class="td-search-wrapper">
<div id="td-top-search">
<!-- Search -->
<div class="header-search-wrap">
<div class="dropdown header-search">
<!--<i class="td-icon-search"></i>-->
<div class="td-icon-lang"> <?php
$languages = icl_get_languages('skip_missing=0&orderby=code');
$html .= '<i class="td-icon-search"></i>';
$html .= '';
if(!empty($languages)){
foreach($languages as $l){
// if(!$l['active']) $html .= '';
if(!$l['active']) $html .= '
'.$l['language_code'].'';
// if(!$l['active']) $html .= '';
}
}
echo $html;
?></span>

</div>
</div>
</div>
</div>

Post count: 6535

HI

I am not sure where did you find that code but I assume that you’re suing a plugin which can switch site’s language. If somehow your using this implementation: https://wpml.org/documentation/getting-started-guide/language-setup/custom-language-switcher/ make sure that you follow the steps indicated there but we can’t guarantee the it will work fine with our theme as we din’t made any tests with wpml plugin.
If you really need to use this plugin and you’re not aware of the steps that must be taken in this regard my advice is to look for someone who can hep you with implementation or hire a freelancer to do it for you.

Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.