- This topic has 10 replies, 2 voices, and was last updated 9 years, 7 months ago by Nijn.
-
AuthorPosts
-
March 9, 2015 at 2:46 am #52929NijnParticipant
Hi,
I have already used the (fixed) top menu for a menu, but I want to have another menu bar there (preferably even higher then the current top menu).
I have gone through the default wordpress tutorials of creating an extra menu, but then my new menu ends up in the wrong place (below the top menu) and it does not stay fixed when scrolling down.
Is it possible to create an extra menu-line on the top of the page?
So I want the page to look like this:
: first menu line (to be added, menu stays on page when scrolling)
: second menu line (currently the top heading menu, menu stays on page when scrolling)
: header image
: main menu
: page contentThanks a lot in advance!
March 9, 2015 at 11:10 pm #52968SakinKeymaster@Nijn: These are the extra features which cannot done from free support. You might need to consider hiring developer to work on it.
To create extra menu, you need to build child theme first as all edits in the theme core files will be reverted back to original when you update your theme. Then after you make all the edit from the child theme, please post in your site URL and I can help you to make your new menu fixed with css.
March 11, 2015 at 3:01 am #53070NijnParticipantHi Sakin,
The URL for the website is http://www.mondzorgtraianus.nl
I have created a child-theme (catch-Evolution-Child) and altered the header.php in the child-theme to include the additional menu.
I could not get a second instance of the website running, so the additional (curently ugly looking) menu sits in the production site. To hide it from visitors I have altered the CSS to simply not display the additional menu.
The menu is in the class “Top-Link-Menu-Class”.
I want the new menu to look exactly the same as the current top-menu (the one with the options “spoed”, “contact” and “beheer”). The new menu should be on top of the screen, with the current top-menu (spoed, contact and beheer) just below it.
Can this be done by just CSS?
Thanks a lot in advance!March 12, 2015 at 11:00 pm #53178March 15, 2015 at 3:22 am #53353NijnParticipantHi Sakin,
Thanks for your reply!
I don’t think I understand you completely; I cannot find any “access-top wrapper ID” in the header.php.
A snippet of the header.php:<header id="branding" role="banner"> <?php /** * catchevolution_before_headercontent hook * * @hooked catchevolution_header_topsidebar - 10 */ do_action( 'catchevolution_before_headercontent' ); ?> <div id="header-content" class="clearfix"> <div class="wrapper"> <?php // *** ADD CUSTOM MENU // *** wp_nav_menu( array( 'theme_location' => 'Top-Link-Menu', 'container_class' => 'Top-Link-Menu-Class' ) ); // *** // *** END OF CUSTOM MENU ADDITION /** * catchevolution_headercontent hook * * @hooked catchevolution_headerdetails - 10 * @hooked catchevolution_header_rightpsidebar - 15 */ do_action( 'catchevolution_headercontent' ); ?> </div><!-- .wrapper --> </div><!-- #header-content --> <?php /** * catchevolution_after_headercontent hook * * @hooked catchevolution_header_menu - 10 */ do_action( 'catchevolution_after_headercontent' ); ?> </header><!-- #branding -->
Have I inserted the code for the custom menu in the right place?
Thanks!March 15, 2015 at 6:27 pm #53372SakinKeymaster@Nijn: First you need to build child theme and then in your child theme functions.php file you need to add code like below, where you need to add your menu code in the function below:
function catchevolution_below_header_top_menu() { // Add your menu code here } add_action( 'catchevolution_before_header', 'catchevolution_below_header_top_menu', 15 );
March 16, 2015 at 9:44 pm #53452NijnParticipantHi Sakin,
I have created a child-theme, and altered the functions.php so it looks as follows:<?php // ** Add menu function catchevolution_below_header_top_menu() { register_nav_menu('Top-Link-Menu',__( 'Menu top for Links' )); } add_action( 'catchevolution_before_header', 'catchevolution_below_header_top_menu', 15 ); // Add custom CSS add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' ); function enqueue_parent_theme_style() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); } ?>
I don’t see the secondary menu appear in the HTML code (it’s not on the screen because the display:none is still in the css), and now the regular menu no longer lists the items left to right, but top to bottom (please check http://www.mondzorgtraianus.nl).
Any ideas?March 17, 2015 at 1:29 am #53486NijnParticipantDon’t know hwy IE suddenly rendered the menu in the wrong direction. Looks good again. So current site is okay, new menu still doesn’t show up.
March 17, 2015 at 11:48 pm #53558SakinKeymaster@Nijn: Register nav menu should be in that hook. You need to register menu in theme setup function and then call in that hook. This is bit complicated so you might want to hire developer to work on it.
March 21, 2015 at 1:50 am #53855NijnParticipantHi Sakin,
Thanks, I imagined things less complicated than this
I will use another (already present) menu location instead.April 1, 2015 at 1:53 am #54824NijnParticipantJust to let you all know:
I fixed it by installing a links widget and using one of the widget areas to display it.
Works like a charm! -
AuthorPosts
- The topic ‘Create extra fixed menu on top?’ is closed to new replies.