• Resolved LudovicB

    (@ludovicb)


    Hi!
    I’m using Polylang – great plugin! – for a 3-languages website : http://s434637562.onlinehome.fr/LB/wordpress/fr/
    (Work in progress!!)
    Permalink settings: to %postname.
    Using 3 static frontpages, defined as translations of each other.
    Theme: TYPOMINIMA, customized (I only changed the widgets location)

    Problem 1:
    I defined 3 interconnected “top menus” but they don’t appear. Only the french menu appears (my website’s main language is FR).

    Problem 2:
    http://s434637562.onlinehome.fr/LB/wordpress/en/ surprisingly gives a 404 error, whereas http://s434637562.onlinehome.fr/LB/wordpress/fr/ and http://s434637562.onlinehome.fr/LB/wordpress/de/ are working rather well… that is, the french version presents the right content (= a nearly empty presentation page), but the german version presents the right content PLUS a list of the articles in german, which I don’t want there and didn’t intentionally place there.
    And, whatever the language, the links of the main title (= my name) to the homepages in the various languages, are wrong. The french one is right, the 2 others direct to the french one instead of the english and german ones.

    Problem 3:
    Whatever the parameters I define in Settings / Language / Menus, they have no influence. Ex, I can tick or untick “display the flags”, it does not display them.

    Problem 4:
    I’d like to post much of my music, for ex: http://s434637562.onlinehome.fr/LB/wordpress/en/langoureux-orchestral-oriental/
    Problem: the language criteria is not relevant for those posts that are NOT linguistic. How can I do to avoid creating articles in the 3 languages for the exact same music contents? I’d like to have only 1 category available for the 3 languages…

    Thx in advance for your help!
    Cheers,
    Ludovic

    http://wordpress.org/extend/plugins/polylang/

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

    (@ludovicb)

    I guess the problem is there, in my functions.php :

    // Initializing the theme's options for front-end usage
    function typominima() {
    	global $typominima;
    	$typominima = get_option('Typominima');
    }
    add_action('wp_head','typominima');
    
    if(function_exists(add_theme_support)) {
    
    	// Adds support for post thumbnails
    
    	add_theme_support('post-thumbnails');
    
    	// Register top custom menu
    
    	add_theme_support( 'menus' );
    
    	if(function_exists('register_nav_menus')) {
    		register_nav_menus(array(
    			'top-menu' => __( 'Top Menu' ),
    		));
    	}
    
    }
    
    // Top menu checker & builder
    
    function typominima_nav_menu() {
    	if(function_exists(wp_nav_menu)) {
    		$typominima_nav_menu = wp_nav_menu(array('menu' => 'Top Menu', 'container' => '', 'fallback_cb' => 'wp_page_menu', 'echo' => false, 'depth' => 2));
    	}
    	else {
    		$typominima_nav_menu = '<ul class="menu">'.wp_list_pages('sort_column=menu_order&title_li=&echo=0&depth=2').'</ul>';
    	}
    	echo $typominima_nav_menu;
    }

    I defined 3 menus according to the language chosen:
    Principal = french
    Main = english
    Main DE = german.

    Sorry for the bad title of my first post, it wasn’t clear…

    Thread Starter LudovicB

    (@ludovicb)

    Ok, problems 1, 2 and 3 are SOLVED due to the following code, rewritten by a geeky friend of mine :

    // Initializing the theme's options for front-end usage
    function typominima() {
    	global $typominima;
    	$typominima = get_option('Typominima');
    }
    add_action('wp_head','typominima');
    
    if(function_exists('add_theme_support')) {
    
    	// Adds support for post thumbnails
    
    	add_theme_support('post-thumbnails');
    
    	// Register top custom menu
    
    	add_theme_support( 'menus' );
    
    	if(function_exists('register_nav_menus')) {
    		register_nav_menus(array(
    			'top-menu' => __( 'Top Menu' ),
    		));
    	}
    
    }
    
    // Top menu checker & builder
    
    function typominima_nav_menu() {
    	if(function_exists('wp_nav_menu')) {
    $typominima_nav_menu = wp_nav_menu(array('theme_location' => 'top-menu', 'container' => '', 'fallback_cb' => 'wp_page_menu', 'echo' => false, 'depth' => 2));
    
    	}
    	else {
    		$typominima_nav_menu = '<ul class="menu">'.wp_list_pages('sort_column=menu_order&title_li=&echo=0&depth=2').'</ul>';
    	}
    	echo $typominima_nav_menu;
    }

    Problem 4 remains, but I guess that for a coder, that’s not a complex problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Polylang’ is closed to new replies.