Plugin Author
Chouby
(@chouby)
Could you give me a link ?
Thread Starter
acjo
(@acjo)
Plugin Author
Chouby
(@chouby)
So if I well understand, you created 2 menus (one in French, one in English) in Appearence->menus
then you went to Settings->languages->menus
You assigned each menu to its language
You checked “Displays a language switcher at the end of the menu” and “Display flags”
And it does not work as expected. Am I right ?
Thread Starter
acjo
(@acjo)
That is exactly what i have done. And the menu french is the only one i see.
Ps. Thanks for the quick response.
Plugin Author
Chouby
(@chouby)
Well, it seems that your theme does not work in a standard way. For example, there is such an issue with Artisteer generated themes.
Could you look into your theme files (generally header.php) if there is a call to the function wp_nav_menu ?
Thread Starter
acjo
(@acjo)
Ok. I could not seem to find the function wp_nav_menu in the theme files.
I am not an expert php programmer so I could not really adapt the solutions in the links you gave me above to my own problem.
If it’s any help to you, this is the theme that I have downloaded and used :
http://graphpaperpress.com/themes/fullscreen/
Hi Chouby,
Thanks for explaining the topic.
I have another issue, I installed Boldly theme on my WordPress (androidmonsters.com) and I struggle with homepage translation. The matter is that Boldly uses special options for homepage, including slider and columns which. In special boldly menu I can chose from pages which to assign for columns.
I don’t have a homepage page available for edit, so don’t know how to create another language version for homepage.
Appreciate your ideas very much.
Sergey
Plugin Author
Chouby
(@chouby)
@acjo
I did not believe the solution for artisteer themes would work for yours. It was just to say that a lot of themes don’t use a standard way of creating menus and unfortunately I cannot imagine all them !
If you did not find wp_nav_menu, it’s not a good start… However I do not want to register. Please upload a zip file of your theme on your server and post a link here. I will try to look into the source code if I can find some time.
@sergeyl1984
Create a plugin or a child theme. And add this code:
<?php if (function_exists(pll_get_post)) {
add_filter('option_boldy_slider', 'my__boldy_slider');
function my_boldy_slider($value) {
return pll_get_post($value);
}
}
?>
Then create a translation of your ‘Homepage Slider Images Page’. It should allow you to use different images on both homepages.
Just look in the file home.php of your theme. You will see the other options used by your theme. You can do things similar as above (using pll_get_post to translate pages and posts and pll_get_term to translate categories and tags).
Thread Starter
acjo
(@acjo)
Ok I will upload the theme as soon as possible.
Searching in the Header.php file I found that the menu is called by this function:
<?php fullscreen_theme_nav(); ?>
Does this help in any way? Looks like it is a custom function.
Plugin Author
Chouby
(@chouby)
No it doesn’t help. I will need to look into the source code of this function to see how the menu is built.
Thread Starter
acjo
(@acjo)
Plugin Author
Chouby
(@chouby)
Well… The theme is using the standard way of creating menu (wp_nav_menu). But it is buggy as it is using a parameter not recognized by WordPress. It works on a monolingual site which created only one menu just because WordPress fallbacks to the first menu in that case.
The correction is easy. Edit the file functions.php at line 41 and replace:
wp_nav_menu( 'sort_column=menu_order&menu_location=main-menu&container_id=nav&menu_class=sf-menu' );
by
wp_nav_menu( 'sort_column=menu_order&theme_location=main-menu&container_id=nav&menu_class=sf-menu' );
You can send a bug report to the author. It may help someone else π
Thread Starter
acjo
(@acjo)
Brilliant! It works perfectly. Thanks alot.
Now I just have to play around witht he CSS a little but to get the flags positioned just how I want them.
Thanks for your help, you’re a life saver.
@chouby
Thanks a lot for reply and guidance, as I am new to WP, would very appreciate if you can explain how to create a plugin or a child theme. And where to add the code you mentioned?
Thanks!
Sergey