Topbar <p> tag

I ma trying to remove the <p> tag being inadvertently inserted into the topbar. How can I remove this? I have an Uber Menu on the left side and the social icons on the right. The <p> tag pushes every thing down. The client wants the top bar to be at a minimum height but when we have to add padding under the social icons it makes the topbar taller.

Please advise. Thank you.

https://www.leessummitdev.org/

Hello Keith,

Thanks for writing in!

I see there’s a empty paragraph tag. Under Pro > Theme Options > Header > Miscellaneous > Topbar Content please remove and spacing or empty paragraph tag and that should resolve the issue.

Thanks.

I cannot see the paragraph tag in the code for the topbar. The only way it can be removed is by removing the UberMenu shortcode. Any thoughts?

Hello Keith,

By the default, the topbar element will be wrapped with a <p> tag. That section is supposed to accept only plain texts and links. You have made modifications and now it accepts a shortcode which then causes an issue because the resulting elements where wrapped inside the paragraph tag which is not correct. To resolve your issue, you will have to modify the topbar. Since you have your child theme active and ready, please follow these steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

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

<?php endif; ?>

3] Save the file named as _topbar.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/pro-child/framework/legacy/cranium/headers/views/global/

You will need to create the folder path in your child theme because it does not exist yet.

We would love to know if this has worked for you. Thank you.

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