Migrating from CMS Navigation to WPML
WPML includes the functionality of CMS Navigation, with several critical improvements. It produces much cleaner HTML, that’s easier to customize and style and can be controlled from the admin screen.
The old CMS Navigation cannot be activated together with WPML. This is what you’ll need to do in order to migrate:
- Replace the old navigation elements in your theme with the new ones.
- Deactivate CMS Navigation.
- Activate WPML
If you do it in this exact order, your migration process will be smooth.
Replacing the old CMS Navigation elements with WPML elements
Your theme includes calls to functions in CMS Navigation in order to display the top tabs, breadcrumbs and sidebar navigation. We’ll need to replace those with the new style calls for WPML.
| Element | CMS Navigation call (old) | WPML call (new) | |
|---|---|---|---|
| Top tabs | <?php cms_navigation_menu_nav() ?> | <?php do_action(‘icl_navigation_menu’); ?> | |
| Breadcrumbs trails | <?php cms_navigation_breadcrumb() ?> | <?php do_action(‘icl_navigation_breadcrumb’); ?> | |
| Sidebar | <?php cms_navigation_page_navigation() ?> | <?php do_action(‘icl_navigation_sidebar’); ?> |
* Tip: use some sort of search to locate all instances. Sometimes, the navigational elements are added to more than one file in the theme.
Once you’ve done this, your website will still display fine, just without the CMS navigation elements. the do_action calls will either produce the correct output (if WPML is activated) or return quietly without raising any PHP errors (if WPML is still not active).
Swap the CMS Navigation plugin with WPML
Deactivate the CMS Navigation plugin. WPML will refuse to activate while the older plugin is active.
Get the recent version of WPML from its WordPress plugins repository page and unzip in your plugins directory (you can also have WordPress auto-install it, just search for WPML). Activate WPML and you’re done.
Hi,
First i would like to say i love your wmpl plugin.
But for the navigation part is have problems changing it.
I can’t find the ‘old’ cms navigation.
I use thesis as theme
Thx
greetings
Mike
Thesis comes with its own drop-down navigation and it works fine with WPML’s multilingual features. Why do you want to use something else?
Amir: Can you explain how thesis drop-down navigation works with WPML? A lot of people can not get it to work!
Have a look at our post about Thesis, menus and WPML.
Hello, and congratulations for the great multi-language features.
I’m a bit puzzled to see there’s a problem I encountered with not much explanation on the net though…
Somehow the theme menu feature of WP 3.0 doesn’t accept different language versions for the main site navigation (the choice of a menu “spills over” to the other languages)
You mention WPML itself includes great menu navigation features … but I can’t seem to find them on the pages in my installation… where are they?