Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

dimethil on "[Plugin: Polylang] Menus not traduced on my theme"

$
0
0

Well... I spent all the morning, but I found the solution to my problem on this page : http://codex.wordpress.org/Navigation_Menus

So... copy/paste the following code at the end of the functions.php of my theme :

// Register Menu

function register_menu() {
	register_nav_menu('categories_navigation_menu', __('categories_navigation_menu'));
}
add_action('init', 'register_menu');

(just before the last ?>

then, in the header.php page, replace the line :
<?php wp_nav_menu( array('depth' => 3)); ?>

by this new line :
<?php wp_nav_menu( array('theme_location' => 'categories_navigation_menu', 'depth' => 3 ) ); ?>

I have no idea of what I have done, and what this code means, but it finally worked :)


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>