• Resolved AndreasJa

    (@andreasja)


    Hi!

    I have searched the support forum but can’t find a solution to my problem. My website is in two languages and all menus and most internal links are working fine with the translation.

    However, I have some links with the following structure:

    <a href="<?php echo get_option ("mov_archive");?>" class="pull-right cat-more"><?php _e('View more ?', 'xthemes'); ?></a>

    <a href="<?php echo get_option('account_page'); ?>/?action=profile"><i class="fa fa-user mr5"></i> <?php _e('Profile','xthemes'); ?></a>

    If user have chosen English all other links include the /en/ in url, but links with above structure does not include /en/ and language is changed back to original language when user click the link.

    I don’t have a site link to provide atm, running on localhost.

    Thanks! ??

Viewing 1 replies (of 1 total)
  • Plugin Contributor Alex Gor

    (@alexgff)

    snippet to localize url

    
    <?php
    $_url = get_option ("mov_archive");
    $_url = WPGlobus_Utils::localize_url( $_url, WPGlobus::Config()->language ); ?>
    <a href="<?php echo $_url;?>" class="pull-right cat-more"><?php _e('View more ?', 'xthemes'); ?></a>
    
    • This reply was modified 7 years, 2 months ago by Alex Gor.
Viewing 1 replies (of 1 total)
  • The topic ‘Link with echo get_option’ is closed to new replies.