Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Languages & Translations (http://forum.bytesforall.com/forumdisplay.php?f=11)
-   -   Home link in Page Menu Bar (http://forum.bytesforall.com/showthread.php?t=16926)

xaa Mar 5, 2012 10:08 AM

Home link in Page Menu Bar
 
Hello,
I am using atahualpa latest verison with WPML.

How to change the home link, please ?
(Appareance > header area > menu1 (page menu) > Home link in Page Menu Bar)

My wp has 2 languages managed like this :
mydomain.tpl = english version
mydomaine.tpl/fr = french version

The problem is that if I am on the french version. the home link redirect to the root and not to domain.tpl/fr

Any suggestion, please ?

Thanks in advance ,
Xavier

juggledad Mar 5, 2012 11:32 AM

have you asked the plugin author

xaa Mar 5, 2012 12:27 PM

I thought I was on his forum oO

juggledad Mar 5, 2012 12:53 PM

This is the atahualpa theme forum

xaa Mar 6, 2012 03:26 AM

hello,

thank you for your reply. I have found some interresting information on the wpml forum.
but unfortunately the info is outdated.

May I ask to have a look on the following code
(copy/pasted from http://wpml.org/2009/08/multilingual...comment-152189)

maybe you can help me to make this modification on the latest atahualpa (3.7.3) ?


When visitors click on ‘Home’, they expect to get to the home page without switching language. Since each language has a ‘home page’ with a different URL, a single value for all will not work.

Normally, WordPress themes calculate the address for the ‘Home’ page based on the ‘Blog URL’ value set in the admin page. WPML created a function that calculates the correct home address according to the display language.

We replaced get_option(‘home’) with wpml_get_home_url(). Also, the get_option(‘home’) function returns the site’s localication without a trailing slash (/), so themes add it manually. WPML’s function includes this slash (there’s a long story behind this).

To do this change, we had to edit two files. Modified functions/bfa_get_options.php and change:
Code:

$bfa_ata['get_option_home'] = get_option('home');
into
$bfa_ata['get_option_home'] = wpml_get_home_url();
Also, edited functions/bfa_header_config.php and removed the trailing slash from the home page link:
'<a href="' . $bfa_ata['get_option_home'] . '">' . $bfa_ata['bloginfo_name'] . '</a>'

--> I don't find the code on bfa_get_otions.php with atahualpa 3.7.3

regs,
Xaa

juggledad Mar 6, 2012 07:03 AM

you could try this, edit bfa_header_config.php and change line 35 from
HTML Code:

                echo '"><a href="'; bloginfo('url'); echo '/" title="'; bloginfo('name'); echo '">' .
to
HTML Code:

                echo '"><a href="'; wpml_get_home_url(); echo '/" title="'; bloginfo('name'); echo '">' .

xaa Mar 6, 2012 09:52 AM

thanks for your reply.
Unfortunately it doesn't work.

here the line about the homelink on my bfa_header_config.php line 53 (atahualpa 7.5.3)

Code:

echo '"><a href="' . $homeURL . '/" title="'; bloginfo('name'); echo '"><span>' .
regs,
xavier

juggledad Mar 6, 2012 12:47 PM

there is no version 7.5.3 - do you mean 3.5.3 and is there any reason you are so far behind? why not upgrade?

xaa Mar 6, 2012 02:58 PM

I've the 3.7.3 version, sorry for this confusion

juggledad Mar 6, 2012 04:51 PM

oops, I had an old version open. Ok try changing that to
HTML Code:

echo '"><a href="' . $wpml_get_home_url() . '/" title="'; bloginfo('name'); echo '"><span>' .

xaa Mar 8, 2012 04:38 AM

hello,

still not working. I am awaiting reply from wpml support.
but many thanks for your time


All times are GMT -6. The time now is 10:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.