polylang post on homepage
-
Hi,
I also use polylang and I have ‘inspire’ wp theme.
Translation all works great but I would like to default show post in corresponding language on home. So ideally on german it takes post from german news, in french from french news and in english from english news. It does show the correct category links on the homepages. For example here https://194.150.248.140/~volvoar1/en/ you have ‘show all’ and ‘news en’. What I want is it default to open/show my ‘news en’ post. Now you have to click it to see them.In my index I have this code:
<!– FILTER MENU –>
<?php get_template_part(‘inc/templates/template_filter_menu’); ?>and the filter menu code is:
<div id="filter" data-page_type="<?php echo mb_get_page_type(); ?>" data-category="Show all" data-subfilter="Latest" data-current_page="1" data-more_posts="true" data-search_query="<?php echo get_search_query(); ?>" data-author_ID="" data-tag="" > <ul id="filter_category"> <?php //build include string $inspire_options_hp = get_option('inspire_options_hp'); $include_string = " "; if (!empty($inspire_options_hp['cat_ID'])) { foreach ($inspire_options_hp["cat_ID"] as $key => $value) { $include_string .= $key . ","; } $include_string = substr($include_string,0,strlen($include_string)-1); } wp_list_categories(array( 'show_option_all' => __("Show all", "loc_inspire"), 'include' => $include_string, 'title_li' => "" )); ?> <div id="loading-image"><img src="<?php echo get_template_directory_uri(); ?>/images/ajax-loader.gif"></div> <ul id="filter_subfilter" class="sort"> <?php _e('Latest', 'loc_inspire'); ?> <?php _e('Likes', 'loc_inspire'); ?> <li class="last"><?php _e('Comments', 'loc_inspire'); ?> </div>
[Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Anybody an idea how i can make english post open default on english home in stead of show all? (and french on french etc) Thanks a lot for any help!!
- The topic ‘polylang post on homepage’ is closed to new replies.