This topic has 12 replies, 4 voices, and was last updated 10 years by Abe.

  • Author
  • #9387
     studiblog
    Participant

    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 help

    #9414
     adam
    Participant

    I believe this thread is what you’re looking for:
    https://archived.seventhqueen.com/forums/topic/editing-header-php

    #9449
     studiblog
    Participant

    I dont know what i exactly have to add to the Header.php :-/

    #9482
     Abe
    Keymaster

    Hi, You need to register a new menu with this function added to sweetdate-child/functions.php

    COPY CODE
    
    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

    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.

    #9528
     studiblog
    Participant

    Hey, 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 support

    #9589
     Abe
    Keymaster

    Hi, 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 styling

    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.

    #9592
     studiblog
    Participant

    Thanks, works fine! Your support is awesome 🙂

    #9626
     Abe
    Keymaster

    Great. 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.

    #9627
     Abe
    Keymaster

    Great. 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.

    #24396
     btn23kleo
    Participant

    Please 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;}

    #24643
     Abe
    Keymaster

    Yes 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.

    #24763
     btn23kleo
    Participant

    Can you please expand on that? Are you able to modify the code to support your suggestions… Thank you

    #25020
     Abe
    Keymaster

    well 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.

Viewing 13 posts - 1 through 13 (of 13 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?