Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ldeddens

    (@ldeddens)

    Hi, its dynamic.

    Hi,
    I also use polylang and I have ‘inspire’ wpo theme.
    Translation all works great but I would like to default show post in corresponding langiage on home. So 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. Fopr 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:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <!-- 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' => ""
    
    				));
    			?>
    
    <li>
     					<div id="loading-image"><img src="<?php echo get_template_directory_uri(); ?>/images/ajax-loader.gif"></div>
    				</li>
    			<ul id="filter_subfilter" class="sort">
    
    <li><a href="#"><?php _e('Latest', 'loc_inspire'); ?></a></li>
    <li><a href="#"><?php _e('Likes', 'loc_inspire'); ?></a></li>
    				<li class="last"><a href="#"><?php _e('Comments', 'loc_inspire'); ?></a>
    
    		</div>

    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!!

Viewing 2 replies - 1 through 2 (of 2 total)