Help Regarding Secondary Menu

Hello i am trying to assign a secondary menu at the top
all i am trying to do it to put this code under the main menu <?php ubermenu( '5776' , array( 'theme_location' => 'secondary-menu' ) ); ?> how can i place that properly?

so the menu will appear like this>> http://prntscr.com/i8yvyn

Hi There,

Can you please lets us know what exactly you are trying to do. The code you are adding should give you a menu over there.
To make similar kind of menu as you mentioned in the screenshot, you have to follow the instruction/documentation of uber menu. Or you have to write some custom code for that which is out of our theme support scope.

Thanks for understanding.

I just dont know where to put the code, if i put it in header.php it pushes content to the side, any advices will be welcome !

Hi there,

It shouldnโ€™t be added there, are you on Pro or X? You should edit the file \framework\legacy\cranium\headers\views\{YOUR STACK}\wp-header.php and add your code in between the lines.

Thanks!

Hi , i dont have such folder thoughtโ€ฆ and i am via X, not pro.

Hey There,

Whether you are using X or Pro, you should be using the same file. Please follow the following 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/ETHOS/WP-HEADER.PHP
// -----------------------------------------------------------------------------
// Header output for Ethos.
// =============================================================================

?>

<?php x_get_view( 'global', '_header' ); ?>

  <?php x_get_view( 'global', '_slider-above' ); ?>

  <header class="<?php x_masthead_class(); ?>" role="banner">
    <?php x_get_view( 'ethos', '_post', 'carousel' ); ?>
    <?php x_get_view( 'global', '_topbar' ); ?>
    <?php x_get_view( 'global', '_navbar' ); ?>
   
    <?php ubermenu( '5776' , array( 'theme_location' => 'secondary-menu' ) ); ?>

    <?php x_get_view( 'ethos', '_breadcrumbs' ); ?>
  </header>

  <?php x_get_view( 'global', '_slider-below' ); ?>
  <?php x_get_view( 'ethos', '_landmark-header' ); ?>

3] Save the file named as wp-header.php
4] Upload this file to your server in the child themeโ€™s folder wp-content/themes/x-child/framework/legacy/cranium/headers/ethos/

Hope this helps. Please let us know how it goes.

1 Like

Hi, i did what you told me to do, but from some reason it wont let me to remove the line

<?php ubermenu( '5776' , array( 'theme_location' => 'secondary-menu' ) ); ?>

from the header.php

Hi There,

I got this error message when edited the header.php file.

ืœื ื ื™ืชืŸ ืœืชืงืฉืจ ืขื ื”ืืชืจ ื›ื“ื™ ืœื‘ื“ื•ืง ืฉื’ื™ืื•ืช ืงื•ื“ ืงื˜ืœื ื™ื•ืช, ื•ืœื›ืŸ ื”ืฉื™ื ื•ื™ ื‘-PHP ื‘ื•ื˜ืœ ื•ื”ืงื•ื“ ืฉื•ื—ื–ืจ. ื™ื”ื™ื” ืขืœื™ืš ืœื”ืขืœื•ืช ืืช ืงื•ื‘ืฅ ื”- PHP ืฉืœืš ืขื ื”ืฉื™ื ื•ื™ื™ื ื‘ืืžืฆืขื™ื ืื—ืจื™ื, ื›ื’ื•ืŸ ื‘ืืžืฆืขื•ืช SFTP.

In this case, you should connect to your FTP account and edit the header.php file.

Regards!

but it wasnt like this before, what has changed?

Well in this case, i have edited the file, removed this code and did what you told me, and it doesnt seems to work :frowning: so i restoed it as the code in the header

Hi There,

Could you please provide us with your FTP account so we can take a closer look?

Thanks.

1 Like

Ok i will attach FTP

Hi There,

I can see that on wp-header.php file this line was added:
<?php ubermenu( '5776' , array( 'theme_location' => 'secondary-menu' ) ); ?>
On your frontpage, Iโ€™ve checked the source code and that specific menu is there. See this: https://screencast-o-matic.com/watch/cFn1V3ogt5

It seems this button: https://screencast-o-matic.com/watch/cFn1Vuogt9
I am not sure what is your expectation with the code you have added, but that is the result. Please clarify.

1 Like

Hey Lely!

  1. I have added manualy an integration code of ubermenu secondary menu
<?php ubermenu( '5776' , array( 'theme_location' => 'secondary-menu' ) ); ?>

because i want this โ€œstarโ€ button on the side to show as it actualy does now, but i dont think i did it the right way, as for it pushes content aside. therefore i asked of how i could add it in a good way so it will not push content aside,
2) Also i have another questionโ€ฆ
the top banner i am using a Section background but the background only fits the size only after i put inside the section a transparent image, any idea how i can use the full size of the background (banner) without the transparent image?
screenshot>> http://prntscr.com/iapbv2

Hi there,

Th star is there and showing the rest of the toggle should be coded and styled to match your design. Would you please kindly give us the exact screenshot of a pushed and not pushed content to know which section you are talking about? Then we will try to suggest you proper CSS code.

Please consider that this is considered as a customization and our theme does not have such a feature out of the box, so it is outside of our support scope and we will not be able to implement the code. But we will do our best to suggest and give you the starting guide.

Kindly open up new threads for additional questions as it will help us to focus on each issue and give you a better support which you deserve. Having a long threads makes the maintaining job harder and also it will be harder for the other customers to find the correct information if they have similar issues. You are always welcomed to reply to this thread to follow up the same question.

Thank you.

1 Like

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