-
Author
-
January 8, 2014 at 17:03 #9387studiblogParticipant
How can i add a menu to the black top bar? next to the social icons.
I think there was a thread here but i can’t find it.
Thanks for helpJanuary 9, 2014 at 07:16 #9414adamParticipantI believe this thread is what you’re looking for:
https://archived.seventhqueen.com/forums/topic/editing-header-phpJanuary 9, 2014 at 22:03 #9449studiblogParticipantI dont know what i exactly have to add to the Header.php :-/
January 10, 2014 at 10:18 #9482AbeKeymasterHi, You need to register a new menu with this function added to sweetdate-child/functions.php
COPY CODEfunction kleo_register_my_menus() { register_nav_menus( array( 'Top' => __( 'In the top bar', 'kleo_framework' ), ) ); } add_action( 'init', 'kleo_register_my_menus' );
And then in header.php add this code somewhere inside top-links div.
<?php wp_nav_menu( array( 'container' => false, 'menu_class' => 'left top_menu', 'theme_location' => 'Top', 'fallback_cb' => '', 'walker' => new sweetdate_walker_nav_menu)); ?>
and this style to Sweetdate – Styling options – Quick css
COPY CODE.top_menu {list-style: none;} .top_menu li {float:left;margin-right: 10px} .top_menu li:last-child {margin-right: 0;}
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.January 10, 2014 at 18:44 #9528studiblogParticipantHey, it works, but is it possible to put the menu items horizontal instead vertical, because then the top bar would be smaller… (look: http://www.spottedfriends.de )
And, maybe you can add this feature also to your next update, so that nobody has to customize the Quick CSS, header and so on… 😉
Thanks for your supportJanuary 12, 2014 at 19:01 #9589AbeKeymasterHi, I already gave you the CSS for that but also you should have basic HTML/CSS/PHP knowledge if you want to go and change default functionality.
I modified the code above because I haven’t added the top-menu class to the menu to take the stylingHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.January 13, 2014 at 00:56 #9626AbeKeymasterGreat. I am glad it works now 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.January 13, 2014 at 00:56 #9627AbeKeymasterGreat. I am glad it works now 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.August 2, 2014 at 01:39 #24396btn23kleoParticipantPlease let me know if I would be able to use the same codes to add custom menu items next to the social links in the top bar in KLEO theme. Please help!
Register a new menu with this function added to sweetdate-child/functions.php
function kleo_register_my_menus() {
register_nav_menus(
array(
‘Top’ => __( ‘In the top bar’, ‘kleo_framework’ ),
)
);
}
add_action( ‘init’, ‘kleo_register_my_menus’ );And then in header.php add this code somewhere inside top-links div.
<?php wp_nav_menu( array( ‘container’ => false, ‘menu_class’ => ‘left top_menu’, ‘theme_location’ => ‘Top’, ‘fallback_cb’ => ”, ‘walker’ => new sweetdate_walker_nav_menu)); ?>and this style to Sweetdate – Styling options – Quick css
.top_menu {list-style: none;}
.top_menu li {float:left;margin-right: 10px}
.top_menu li:last-child {margin-right: 0;}August 4, 2014 at 19:00 #24643AbeKeymasterYes you can do that and change the name from Top to another new name
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.August 5, 2014 at 17:28 #24763btn23kleoParticipantCan you please expand on that? Are you able to modify the code to support your suggestions… Thank you
August 7, 2014 at 17:06 #25020AbeKeymasterwell you just pasted a code and asked if it is possible to create a new menu and I said yes. see my initial reply https://archived.seventhqueen.com/forums/topic/add-menu-to-the-black-top-bar/#post-9482
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.