Hello There,
Thanks for writing in! Before you can align the Goggle Translator with the logo, you must place it in the same container with the logo. Please move your code to the _navbar.php
file instead. Since you have your child theme active and ready, please follow the following steps below:
- Remove the
_topbar.php
first.
- Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
- Insert the following code into that new file
<?php
// =============================================================================
// VIEWS/GLOBAL/_NAVBAR.PHP
// -----------------------------------------------------------------------------
// Outputs the navbar.
// =============================================================================
$navbar_position = x_get_navbar_positioning();
$logo_nav_layout = x_get_logo_navigation_layout();
$is_one_page_nav = x_is_one_page_navigation();
?>
<?php if ( ( $navbar_position == 'static-top' || $navbar_position == 'fixed-top' || $is_one_page_nav ) && $logo_nav_layout == 'stacked' ) : ?>
<div class="x-logobar">
<div class="x-logobar-inner">
<div class="x-container max width">
<?php x_get_view( 'global', '_brand' ); ?>
<?php // insert your Google Translator code here ?>
</div>
</div>
</div>
<div class="x-navbar-wrap">
<div class="<?php x_navbar_class(); ?>">
<div class="x-navbar-inner">
<div class="x-container max width">
<?php x_get_view( 'global', '_nav', 'primary' ); ?>
</div>
</div>
</div>
</div>
<?php else : ?>
<div class="x-navbar-wrap">
<div class="<?php x_navbar_class(); ?>">
<div class="x-navbar-inner">
<div class="x-container max width">
<?php x_get_view( 'global', '_brand' ); ?>
<?php x_get_view( 'global', '_nav', 'primary' ); ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
- Save the file named as
_navbar.php
- Upload this file to your server in the child theme’s folder
wp-content/themes/framework/legacy/cranium/headers/views/global
. You will have to create the folder path since it does not exist yet in your child theme.
Now that the Google Translator is in the same container with the logo, you may need a little css code to properly style it a bit.
Please let us know how it goes.