Home page reverts to default language

Having Problems? Need Help? Post here!

Re: Home page reverts to default language

Postby blackbookdesign » Tue Mar 02, 2010 4:11 pm

Hey Theresel,

just change the
Code: Select all
get_option('home')

to
Code: Select all
bloginfo('url')
in your functions code.

I guess it should make things work.
let us know.
blackbookdesign
 
Posts: 25
Joined: Tue May 19, 2009 10:13 pm

Re: Home page reverts to default language

Postby flip flop » Tue Mar 02, 2010 4:40 pm

hi,

here is flip flop.
You can find in your posted code: get_option('home') -> change it into bloginfo('url').

does it work?
flip flop
 
Posts: 4
Joined: Sun Feb 28, 2010 11:53 am

Re: Home page reverts to default language

Postby theresel » Tue Mar 02, 2010 9:21 pm

I tried changing both instances to bloginfo('url') - but when I change the first one, the whole link for the home page is printing on top of my art-menu and the menu is shifted down on the page.

When I change only the second one, nothing happens....
theresel
 
Posts: 12
Joined: Fri Feb 26, 2010 6:20 pm

Re: Home page reverts to default language

Postby blackbookdesign » Tue Mar 02, 2010 9:46 pm

Can you post a screenshot?
I can't see why it's doing this....
You could have omitted some code or erased some?

send me your functions.php file as well.

it's my name @hotmail.com
thx.
blackbookdesign
 
Posts: 25
Joined: Tue May 19, 2009 10:13 pm

Re: Home page reverts to default language

Postby theresel » Wed Mar 03, 2010 12:41 am

Hi again blackbookdesign,

Here's the screenshot - this is what happens if I change the first instance of get_option('home'). I'm not sure you'll be able to see with this. I'll send you the screenshot by email along with my functions.php file.

Thanks.
Image
theresel
 
Posts: 12
Joined: Fri Feb 26, 2010 6:20 pm

Re: Home page reverts to default language

Postby theresel » Fri Mar 05, 2010 4:19 pm

Hurray.....! I found the solution. For those interested using Artisteer themes, 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.
theresel
 
Posts: 12
Joined: Fri Feb 26, 2010 6:20 pm

Re: Home page reverts to default language

Postby Tarnfisch » Wed Mar 24, 2010 6:50 pm

Hi Theresel,

I have an Artisteer theme too and the same Problem.
I got all the same results if I just replaced get_option('home') with bloginfo('url')

So I tried your solution in the functions.php which is in the folder of the theme.
But nothing happens.
Do you have replace URL with yoursiteurl ?

qtrans_convertURL(get_option('home'))
Like this: qtrans_converthttp://www.newnotes.de/?lang=en(get_option('home')) ?

I do not know what else to do. I copied everything exactly how you posted it. Tried it three times.

Did you only replace this code:

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);


or did you something else ?

Thank you

Tarnfisch
Tarnfisch
 
Posts: 2
Joined: Wed Mar 24, 2010 6:27 pm

Previous

Return to qTranslate Support Forum

Who is online

Users browsing this forum: Google [Bot] and 7 guests