rachpape37
Forum Replies Created
-
Forum: Plugins
In reply to: [Polylang] Getting different page translations from a single URLYves,
Thank you for your kind reply! I finally figured it out with the help of another forum friend, this is the function that worked in my footer.php:
a href="<?php echo get_permalink( pll_get_post (6668) ); ?>"> <?php if ( 'en_US' == get_locale() ) echo 'Acupuncture'; else echo 'Acupuntura'; ?></a>
Forum: Plugins
In reply to: [Polylang] Links in Footer not translatingOh yes, it finally worked! Thank you so much!
My final solution looked like this :
a href="<?php echo get_permalink( pll_get_post (6668) ); ?>"> <?php if ( 'en_US' == get_locale() ) echo 'Acupuncture'; else echo 'Acupuntura'; ?></a>
Forum: Plugins
In reply to: [Polylang] Links in Footer not translatingI also tried this function, but also did not retrieve the page in Spanish:
<a href="<?php echo esc_url( get_permalink( get_page_by_title( 'Monthly Events' ) ) ); ?>"><?php esc_html_e( 'Monthly Events', 'textdomain' ); ?></a>
Forum: Plugins
In reply to: [Polylang] Links in Footer not translatingHi Chrysti,
I am sorry, I really do not know php, so I am not sure how to write the id correctly. I would like to use the page title as the id, that is why I wrote Acupuncture, because this is the name of the page.
Forum: Plugins
In reply to: [Polylang] Links in Footer not translatingHi again,
I have tried to get it to work, but now the link does not work, could you see where I am incorrect in the below code: ?
<a href="<?php echo get_permalink( pll_get_post ($Acupuncture) ); ?>"> <?php if ( 'en_US' == get_locale() ) echo 'Acupuncture'; else echo 'Acupuntura'; ?></a>
Forum: Plugins
In reply to: [Polylang] Links in Footer not translatingHi Chrysti!
Thank you for the reply, where do I place this function? In my theme’s function.php ?
thanks!
Forum: Plugins
In reply to: [Polylang] Getting different page translations from a single URLHi ypeynaud & Chouby!
I am having a similar problem. I have created a custom footer and inserted the proper php code so the strings would translate, but the links in the footer always go to the English version of the page and not the Spanish. I have been searching for solutions…
Any help Chouby?My test site is: test.bcnwellwoman.com
Here is a snippet of the footer code:
<li><a href="https://test.bcnwellwoman.com/en/services/acupuncture/"><?php _e("Acupuncture", "wellnesscenter-child"); ?></a></li>
Thanks you for helping me find a solution!
Best,
RachelForum: Plugins
In reply to: [Polylang] Links in Footer not translatingSorry the code did not display correctly :/
this is it:
<li><a href="https://test.bcnwellwoman.com/en/services/acupuncture/"><?php _e("Acupuncture", "wellnesscenter-child"); ?></a></li> <li><a href="https://test.bcnwellwoman.com/en/services/massage/"><?php _e("Massage", "wellnesscenter-child"); ?></a></li>
Thank you so much for posting this!
I am having the same exact issue, plugin ignores anything after the hashtag, thus none of my anchor links work!
I hope polylang will resolve this issue as soon as possible !
Thanks!