Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1239581
    Bell_Lodge
    Participant

    Hi there

    Have followed this ticket https://community.theme.co/forums/topic/how-to-add-wmpl-language-switcher-to-top-bar/#post-24735 and get only the php code in the topbar.

    Are you able to help??

    Site details etc in Private Message..

    Thanks

    Rick M
    NZ

    #1239622
    Bell_Lodge
    Participant
    This reply has been marked as private.
    #1239734
    Jade
    Moderator

    Hi there,

    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.

    Once this child theme is activated, copy the file _topbar.php from wp-content/themes/x/framework/views/global/ then add it in wp-content/themes/x-child/framework/views/global/ then replace the code in the file with this:

    <?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">
          <p class="x-lang-select"><?php do_action('icl_language_selector'); echo 's';?></p>
          <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?>
          <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p>
          <?php endif; ?>
          <?php x_social_global(); ?>	
        </div>
      </div>
    
    <?php endif; ?>

    Then add this code in the CSS customizer:

    p.x-lang-select {
        float: right;
    }
    
    .x-topbar .x-social-global {
        float: left;
    }

    Hope this helps.

    #1242987
    Bell_Lodge
    Participant

    Hi there

    I have tried the above and am still getting the same result..

    Also have disabled WPML adding any menu to NavBar / Footer etc..

    Any further assist would be appreciated.

    Rick M
    NZ

    #1243288
    Paul R
    Moderator

    Hi Rick,

    We need your http login to be able to check on this.

    http://screencast.com/t/PgHOeG9ml

    Thanks

    #1244205
    Bell_Lodge
    Participant
    This reply has been marked as private.
    #1244699
    Rad
    Moderator
    This reply has been marked as private.
    #1244859
    Bell_Lodge
    Participant

    HI Rad,

    My Bad I think. It should have been the dev site, I test out there before breaking the main site. Hopefully, I will have it back up shortly, cos even I cannot see it now. πŸ™

    As soon as I can I will let you know.. Interesting about the weird characters though. Will look into that for sure.

    Many Thanks

    Rick M

    NZ

    #1244910
    Christopher
    Moderator

    Hi there,

    Your code is completely different from what we’ve provided, see :

    <?php਍ഀ
    // =============================================================================ΰ¨βΌ€βΌ€β€€ε˜€δ€€δ”€εœ€εŒ€βΌ€δœ€δ°€δΌ€δˆ€δ„€δ°€βΌ€εΌ€ε€δΌ€ε€€δˆ€δ„€εˆ€βΈ€ε€€δ €ε€€ΰ΄€
    // -----------------------------------------------------------------------------ΰ¨βΌ€βΌ€β€€δ€€ζΈ€ζŒ€ζ°€η”€ζ€ζ”€ηŒ€β€€η€ζΌ€η€€ζˆ€ζ„€ηˆ€β€€ζΌ€η”€η€η€€η”€η€βΈ€ΰ΄€
    // =============================================================================਍ഀ
    ?>਍ഀ
    <?php if ( x_get_option( 'x_topbar_display' ) == '1' ) : ?>਍ഀ
      <div class="x-topbar">ΰ¨β€€β€€β€€β€€γ°€ζ€ζ€€η˜€β€€ζŒ€ζ°€ζ„€ηŒ€ηŒ€γ΄€βˆ€η €β΄€η€ζΌ€η€€ζˆ€ζ„€ηˆ€β΄€ζ€€ζΈ€ζΈ€ζ”€ηˆ€β€€η €β΄€ζŒ€ζΌ€ζΈ€η€ζ„€ζ€€ζΈ€ζ”€ηˆ€β€€ζ΄€ζ„€η €β€€ηœ€ζ€€ζ€η€ζ €βˆ€γΈ€ΰ΄€
          <p class="x-lang-select"><?php do_action('icl_language_selector'); echo 's';?></p>ΰ¨β€€β€€β€€β€€β€€β€€γ°€γΌ€η€€ζ €η€€β€€ζ€€ζ˜€β€€β €β€€η €εΌ€ζœ€ζ”€η€εΌ€ζΌ€η€€η€ζ€€ζΌ€ζΈ€β €β€€βœ€η €εΌ€η€ζΌ€η€€ζˆ€ζ„€ηˆ€εΌ€ζŒ€ζΌ€ζΈ€η€ζ”€ζΈ€η€βœ€β€€β€€β€€β„€γ΄€β€€βœ€βœ€β€€β€€β€€γ¨€β€€γΌ€γΈ€ΰ΄€
          <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p>ΰ¨β€€β€€β€€β€€β€€β€€γ°€γΌ€η€€ζ €η€€β€€ζ”€ζΈ€ζ€ζ€€ζ˜€γ¬€β€€γΌ€γΈ€ΰ΄€
          <?php x_social_global(); ?>	ΰ¨β€€β€€β€€β€€γ°€βΌ€ζ€ζ€€η˜€γΈ€ΰ΄€
      </div>਍ഀ
    <?php endif; ?>

    Please edit _topbar.php and update replace code with the one we provided in previous replay.

    Hope it helps.

    #1245730
    Bell_Lodge
    Participant

    Hi Team..

    Thank you for your efforts.

    I have no idea how the characters managed to get into the file, however I have updated the code and things seem to be working fine.. Something weird no doubt has been going on at my end, I will track it down eventually. Will remain on the alert until I do.

    Thank You again..
    Always appreciate the help provided..

    Rick M
    NZ

    #1245857
    Christian
    Moderator

    You’re welcome.

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