2014-01-19, 23:07:27
During doing my site multilingual, I also had one issue inexperienced user might have problems with.
The thing is that you have to show the posts by nm_show_tag() function, but when you want to open them, you have to do it via get_page_content(); this time. That's why I had to do a little conditional snippet. It's for tags 'cz' and 'en', depending on language.
It just uses the get_page_content() everywhere except the main news page. On the main news page, it uses nm_show_tag('cz') or nm_show_tag('en'), depending on the language.
The thing is that you have to show the posts by nm_show_tag() function, but when you want to open them, you have to do it via get_page_content(); this time. That's why I had to do a little conditional snippet. It's for tags 'cz' and 'en', depending on language.
It just uses the get_page_content() everywhere except the main news page. On the main news page, it uses nm_show_tag('cz') or nm_show_tag('en'), depending on the language.
Code:
<?php if (!nm_is_home()) { ?>
<?php # CONTENT ?>
<?php get_page_content(); ?>
<?php } ?>
<?php # POSTS ?>
<?php if (nm_is_home()) { ?>
<?php nm_set_custom_excerpt(440) ?>
<?php if ($language == 'cs') { ?>
<?php nm_show_tag('cz'); ?>
<?php } else { ?>
<?php nm_show_tag('en'); ?>
<?php } ?>
<?php } ?>
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
» The little I did for GetSimple