Tagged: x
-
AuthorPosts
-
March 14, 2017 at 7:49 pm #1407386
JulieBDBParticipantHello,
I would like to place the language switcher in the top right corner of the top bar but I can’t find where the php file is. I have set up a Renew child theme.
1/ Please confirm I should us this guidelines
https://community.theme.co/forums/topic/wmpl-switcher-in-the-topbar/2/ Where can I access my php.file please?
I’ll share my website credentials with you in another message.
Many thanks in advance
Kind regards,
JulieMarch 14, 2017 at 7:52 pm #1407389
JulieBDBParticipantThis reply has been marked as private.March 15, 2017 at 2:58 am #1407676
LelyModeratorHello Julie,
Yes, we can use that thread as guide.
I can see you have a child theme already.
Copy _topbar.php from this folder \wp-content\themes\x\framework\views\global to your child theme here: \wp-content\themes\x-child\framework\views\global. Open the copied file, add the following line:<?php do_action('icl_language_selector');?>After this part:
<?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?> <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p> <?php endif; ?>Hope this helps.
March 16, 2017 at 7:50 pm #1410439
JulieBDBParticipantThis reply has been marked as private.March 17, 2017 at 4:45 am #1410842
FriechModeratorHi Julie,
Please follow this guide thoroughly, login to your server via FTP and navigate to this directory: \wp-content\themes\x-child\framework\views\global\, there create a file named _topbar.php (if it is exist then open and edit that file). Replace the entire existing content of that _topbar.php file with the code below.
<?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; ?> <div class="lang-switcher right"><?php echo do_shortcode( '[wpml_language_selector_widget]' ); ?></div> <?php x_social_global(); ?> </div> </div> <?php endif; ?>This should be the entire content of your _topbar.php file now. Then save.
Your site has a caching plugin, so make sure you clear that before you preview the site.
Hope it helps, Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1407386 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
