Commit efbc2a4b authored by Simonas's avatar Simonas

Languages links to home

parent adc64b38
......@@ -80,6 +80,7 @@ $section = get_post_meta( $post->ID, 'section', true );
get_template_part( 'template-parts/menus/menu', 'main' );
?>
</nav>
<?php
get_template_part( 'template-parts/menus/menu', 'language' );
?>
......@@ -95,7 +96,7 @@ $section = get_post_meta( $post->ID, 'section', true );
<div id="main" class="l-content">
<?php
if ( !is_front_page() && get_post_type() == 'page' && get_page_template_slug() == 'page-jobs.php'):
if ( !is_front_page() && get_post_type() == 'page' && get_page_template_slug() == 'page-jobs.php' || is_search() ):
?>
<aside class="l-aside">
<?php
......
......@@ -5,7 +5,11 @@
?>
<ul class="o-nav c-nav--lang">
<?php
$translations = pll_the_languages(array('raw'=>1));
$translations = pll_the_languages( array(
'raw'=>1,
'force_home'=>1
) );
foreach ($translations as $code => $lang) :
$classCSS = $lang['current_lang'] ? 'class="act"' : '';
echo '<li><a href="' . $lang['url'] . '" title="' . $lang['name'] . '" ' . $classCSS . '>' . strtoupper($lang['slug']) . '</a></li>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment