Nav Menu not working on desktop since adding image below

Hello I found some topics on here about adding a banner to the website which were super helpful. I added the following to my child theme functions.php file for axisstars.com and the banner is showing great but the menu is no longer working e.g. clickable on desktop although it’s still working on mobile. Any ideas how I can fix this?

// Add Ad above the navbar
// =============================================================================
function ad_leatherboard(){ ?>
  
  <div class="custom-ad x-container max width center-text pam">
    <!-- Ad Leatherboard -->
	  <a href = "link" target="_blank">
    <img src="MY_image_url" alt="Ad Image"></a>
  </div>

<?php }
add_action('x_after_view_global__nav-primary', 'ad_leatherboard');

Also we have a FR version of the website too so I want to be able to use the code to show one version of the banner on axisstars.com and a different one on axisstars.com/fr - is that possible?

Hello @hamerkate,

Thanks for writing in!

The PHP code that you are using will only works best if you are using the stacked logo and navigation menu. It is best that you update the code and use this instead:

// Add Ad above the navbar
// =============================================================================
function ad_leatherboard(){ ?>
  
  <div class="custom-ad x-container max width center-text pam">
    <!-- Ad Leatherboard -->
	  <a href = "link" target="_blank">
    <img src="MY_image_url" alt="Ad Image"></a>
  </div>

<?php }
add_action('x_after_view_global__navbar', 'ad_leatherboard');

Please note that custom coding is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third party developer. We are unable to provide support for customizations under our Support Policy.

Best Regards.

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