Mrs. T.
|
I've set up wordpress to show a static page for the home page with the English title as "Home" and the French title as "Accueil". The title tag in the menu appears correctly for both languages, but when viewing the English site, if we click on the "Home" button it goes back to the French language front page. I thought that static pages would correctly direct to the correct language even if it is called Home. I searched many forums and some suggested to change get_option('home') to bloginfo('url') in the header.php, but I don't have this code anywhere in my header created by Artisteer.
Pls. help. 
|
|
Adeptris
|
The menu is set in functions.php and the get_option('home') is in a function look for the line 'function art_print_homepage()'
and the get_option home code is within the code block
David
|
|
Mrs.T.
|
I looked for the "function art_print-homepage()" in functions.php and it is not there.
I have only two places where get_option('home') is and the first one in in "function art_list_pages_filter($output)" and the second one is in "function art_menu_items()".
When I change the first one - the home page link is being printed on top of my menu bar and the menu bar is shifted lower on the page. And when I change the second one, nothing at all happens.
|
|
Adeptris
|
You have an earlier created version pre 2.4, where it is in the function:
art_menu_items()
Search for
. get_option('home') .
between the periods
. bloginfo('url') .
Replace both instances, if that does not work then
David
|
|
Mrs.T.
|
Hurray.....! I found the solution. For those using qTranslate plugin, this is what I did:
In functions.php, find this code under - function art_list_pages_filter($output)
if ($frontID)
$output = preg_replace('~<li class="([^"]*)\b(' . $pref . $frontID . ')\b([^"]*)"><a href="([^"]*)" ~',
'<li class="$1$2$3"><a href="'. get_option('home') .'" ', $output, 1);
and replace it with:
if ($frontID)
$output = preg_replace('~<li class="([^"]*)\b(' . $pref . $frontID . ')\b([^"]*)"><a href="([^"]*)" ~',
'<li class="$1$2$3"><a href="'. qtrans_convertURL(get_option('home')) .'" ', $output, 1);
Anyway, this is working like a charm for me and the Home link is now going to the right language.
|
|
Mrs.T.
|
It can also be changed in - function art_menu_items()
In case you don't have it in the first function (older versions of Artisteer).
|
|
marsviolet
|
But what if you are already committed to "xLanguage" plugin?
Does anybody have a solution for this?
I do not know much about writing PHP, but I can get with instructions.
thanks
|
|
Nick L W
|
THANKS A MILLION MRS. T.
I've been searching for an answer for ages in the qTranslate Forum. I never though to look in the Artisteer forum!
I'd jut about given up with the well meaning boffins at qTranslate that only talk in computer-speak and suggest solutions that I can't begin to understand.
I've taken the liberty of crediting you in the forum strand. The forum is:
qTranslate Suggestions Forum
Title: Clicking on the Title/Home-Link resets selected language.
|
|
Toomas
|
Same problem if you use WPML Wordpress 3.01 and Artisteer 2.5 gen theme. Then in navigation.php change in two places:
url: get_option
to
get_home_url()
And it works perfect.
P.S. I think in artisteer there are different costumer service peoples. Some gives good solutions and others not :)
|
|
Henk Hogeveen
|
Hi Toomas
I'm using Artisteer 2.5.0.31067 Standaard on WP 3
Did not find url: get_option
in navigation.php
USING WPML as language plugin and only home link is not automaticallly changed to right language
|
|
Henk Hogeveen
|
Quote Toomas:
Same problem if you use WPML Wordpress 3.01 and Artisteer 2.5 gen theme. Then in navigation.php change in two places:
url: get_option
to
get_home_url()
And it works perfect.
P.S. I think in artisteer there are different costumer service peoples. Some gives good solutions and others not :)
Thks toomas.
It worked out in this piece of code in core/navigation.php
$href = get_page_link($page->ID);
if ($this->frontID && $this->frontID == $page->ID) {
//$href = get_option('home');
$href = get_home_url();
|
|
Jeroen
|
In navigation.php I want to replace the get_option code in two places (like Toomas wrote).
However I found thid code on 9 different places. Which 2 places have to be replaced?
|
|
Jeroen
|
I get it:
In navigation.php
Change:
get_option('home')
to:
qtrans_convertURL(get_option('home'))
(twice)
|
|
NickLW
|
Thanks Jeroen
I'm using Artisteer 3.1.0.45075 with Wordpress 3.3.1
Just tried your advice above.
But I only found one
get_option('home')
in navigation.php
So I couldn't do it twice. However, it seems to be working ... so good news!
Cheers
|
|
John Smith
|
Hi, guys! I should say that it is awesome that now a lot of people can speak at least two languages! I work as a web developer. English is not my native language but I can easily make business with clients from all over the world! By the way, if you want to learn any new language or improve yours - I would truly recommend you to check out this list of top apps for language exchange https://preply.com/en/blog/language-exchange-app/!
|
|