Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #889854
    mallorcanetworks
    Participant

    Hi!

    I´m finishing a site and i installed WPML, I wanted to add the Lenguajes bar in the TOP BAR of the header, but in the customize area i can just add text, and the wpml code to add the bar is in php;
    <?php do_action(‘wpml_add_language_selector’); ?>

    How can i add it?

    Thansk a lot!

    pd. url is http://pre.hotelsacoma.com

    #889864
    mallorcanetworks
    Participant

    Adding a question to previous;

    When i started to translate, and i created a new english page for the home, i cant edit the home i had previously created with cornerstone it shows this message;
    http://pre.hotelsacoma.com/?cornerstone=1

    Sa Coma
    Welcome to our little corner of the Internet. Kick your feet up and stay a while.
    Nothing to Show Right Now
    It appears whatever you were looking for is no longer here or perhaps wasn’t here to begin with. You might want to try starting over from the homepage to see if you can find what you’re after from there.

    Do you know what is happening?

    Thanks
    Pd. please dont forget to answer the question on previous reply!

    #890681
    Jade
    Moderator

    Hi there,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #891557
    mallorcanetworks
    Participant
    This reply has been marked as private.
    #892550
    Rad
    Moderator

    Hi there,

    The password is incorrect, please check and let us know 🙂

    Thanks!

    #893280
    mallorcanetworks
    Participant
    This reply has been marked as private.
    #894283
    Rad
    Moderator

    Hi there,

    Please check again 🙂

    I disabled the language redirect and re-save permalinks.

    Cheers!

    #894416
    mallorcanetworks
    Participant

    Thanks! Works perfect,
    About my first question

    I wanted to add the Lenguajes bar in the TOP BAR of the header, but in the customize area i can just add text, and the wpml code to add the bar is in php;
    <?php do_action(‘wpml_add_language_selector’); ?>

    How can i fix it?
    Thanks!

    #895245
    Zeshan
    Member

    Hi there,

    Thanks for writing back!

    If you want to insert your code in the topbar, you’ll need to edit it’s template file. Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    After that, copy the file wp-content/themes/x/framework/views/global/_topbar.php in your child theme’s folder /framework/views/global/, open the copied file in a text editor and replace entire code with following:

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_TOPBAR.PHP
    // -----------------------------------------------------------------------------
    // Includes topbar output.
    // =============================================================================
    
    ?>
    
    <?php if ( x_get_option( 'x_topbar_display' ) == '1' ) : ?>
    
      <div class="x-topbar">
        <div class="x-topbar-inner x-container max width">
          <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?>
          <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p>
          <?php endif; ?>
          <?php do_action('wpml_add_language_selector'); ?>
          <?php x_social_global(); ?>
        </div>
      </div>
    
    <?php endif; ?>
    

    Hope this helps. 🙂

    Thank you!

    #896416
    mallorcanetworks
    Participant

    Hi! Helps a lot!
    Thaaanks!

    #897220
    Rue Nel
    Moderator

    You are most welcome!

  • <script> jQuery(function($){ $("#no-reply-889854 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>