Help with NavBar

Hi Can you help me put two logos on the navbar, something like the screenshot i’ve attached

Hi There,

Please create this file _brand.php file with the following code below in this directories in your child theme: x-child/framework/legacy/cranium/headers/views/global/

<?php

// =============================================================================
// VIEWS/GLOBAL/_BRAND.PHP
// -----------------------------------------------------------------------------
// Outputs the brand.
// =============================================================================

$site_name        = get_bloginfo( 'name' );
$site_description = get_bloginfo( 'description' );
$logo             = x_make_protocol_relative( x_get_option( 'x_logo' ) );
$site_logo        = '<img src="' . $logo . '" alt="' . $site_description . '">';

?>

<?php echo '<h1 class="visually-hidden">' . $site_name . '</h1>'; ?>

<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
  <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
</a>

<div class="x-second-logo"><img src="http://via.placeholder.com/350x150" /></div>

Hope it helps :slight_smile:

thank you for your reply… but i am not using a child theme. Is it possible to add another image without installing and using the child theme?

Hi there,

It would be best to install a child theme if you are working on a site and customizing it.

It will be more difficult to implement this if you use only CSS.

ok thank you for your reply. My only concern with a child theme is writing code. Does it require more than the parent theme? I know very little about writing code.

Hi there,

You do not need to code anything not unless you want to change something.

Installing the child theme is very straightforward and the code of what you are trying to achieve is already provided on this thread.

thank you so much for your help! I will install the child theme.

Just my two cents but could you just create a graphic banner and place that in the header?

@passawayfarm

Thanks for your input.

My suggestion would be upgrading to PRO and using the header builder instead.

So we have different solutions on the table :slight_smile:

Cheers!

Hi Thai. I dont understand how this works (create this file _brand.php file with the following code below in this directories in your child theme: x-child/framework/legacy/cranium/headers/views/global/)

Is it there in the editor section? Under Themes

Also, I just checked the downloaded child theme folder - it has only
x-child/framework/views

Hi There,

You need to re-create the folders path.

Hope it helps

how do you recreate the folders path?

Hi,

You need to login to ftp or cpanel > file manger then create the folders in your child theme.

/wp-content/themes/x-child/framework/legacy/cranium/headers/views/global/

Thanks

thank you. My site does not have a cPanel. it is an EasyWP site, hosted by NameCheap. Can I do this with my File Manager plugin?

Hi,

Yes, you can do that.

Please check video

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.