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 ); ...@@ -80,6 +80,7 @@ $section = get_post_meta( $post->ID, 'section', true );
get_template_part( 'template-parts/menus/menu', 'main' ); get_template_part( 'template-parts/menus/menu', 'main' );
?> ?>
</nav> </nav>
<?php <?php
get_template_part( 'template-parts/menus/menu', 'language' ); get_template_part( 'template-parts/menus/menu', 'language' );
?> ?>
...@@ -95,7 +96,7 @@ $section = get_post_meta( $post->ID, 'section', true ); ...@@ -95,7 +96,7 @@ $section = get_post_meta( $post->ID, 'section', true );
<div id="main" class="l-content"> <div id="main" class="l-content">
<?php <?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"> <aside class="l-aside">
<?php <?php
......
...@@ -5,7 +5,11 @@ ...@@ -5,7 +5,11 @@
?> ?>
<ul class="o-nav c-nav--lang"> <ul class="o-nav c-nav--lang">
<?php <?php
$translations = pll_the_languages(array('raw'=>1)); $translations = pll_the_languages( array(
'raw'=>1,
'force_home'=>1
) );
foreach ($translations as $code => $lang) : foreach ($translations as $code => $lang) :
$classCSS = $lang['current_lang'] ? 'class="act"' : ''; $classCSS = $lang['current_lang'] ? 'class="act"' : '';
echo '<li><a href="' . $lang['url'] . '" title="' . $lang['name'] . '" ' . $classCSS . '>' . strtoupper($lang['slug']) . '</a></li>'; 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