This topic has 10 replies, 2 voices, and was last updated 11 years by SQadmin.

  • Author
  • #6064
     JohnDoe
    Participant

    How could i add a dropdown menu when someone hovers over the profile tab on homepage.

    #6105
     SQadmin
    Keymaster

    You will need to edit header.php and do a search for “Profile” to find the button.
    You need to have the structure like in the menu, eq:

    COPY CODE
    
    <ul>
    <li class="has-dropdown" id="nav-menu-item-836"><a class="main-menu-link" href="#">Features</a>
    <ul class="dropdown">
    	<li id="nav-menu-item-862"><a class="sub-menu-link" href="#">About us</a></li>
    	<li id="nav-menu-item-855"><a class="sub-menu-link" href="#">Reasons to join</a></li>
    	<li id="nav-menu-item-857"><a class="sub-menu-link" href="#">404 Page</a></li>
    	<li id="nav-menu-item-860"><a class="sub-menu-link" href="#">Full Width Template</a></li>
    	<li id="nav-menu-item-858"><a class="sub-menu-link" href="#">Left Sidebar Template</a></li>
    	<li id="nav-menu-item-859"><a class="sub-menu-link" href="#">Right Sidebar Template</a></li>
    	<li id="nav-menu-item-830"><a class="sub-menu-link" href="#">Search Page</a></li>
    	<li id="nav-menu-item-866"><a class="sub-menu-link" href="#">Shortcodes</a></li>
    </ul>
    </li>
    </ul>
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #6109
     JohnDoe
    Participant

    I tried this :

    COPY CODE
    <ul class="button-group radius right">
                                   
    						<?php if (is_user_logged_in()): ?>
    							<?php /* Only show if Buddypress is installed */ ?>
    								<?php if (function_exists('bp_is_active')): ?>
    
    								
    <li class="relative has-dropdown" id="nav-menu-item836"><a>" class="tiny secondary button radius"><i class="icon-user hide-for-medium-down"></i> <?php _e("PROFILE", 'kleo_framework'); ?></a><div class="kleo-notifications"><?php if( bp_is_active('messages') && messages_get_unread_count() > 0 ) { ?><a>" data-width="210" title="<?php _e("New messages", 'kleo_framework');?>" class="kleo-message-count has-tip tip-left"><?php echo messages_get_unread_count(); ?></a><?php } ?><?php if (bp_is_active('friends') && bp_friend_get_total_requests_count() > 0): ?> <a>" data-width="210" title="<?php _e("Friend requests", 'kleo_framework');?>" class="kleo-friends-req has-tip tip-right"><?php echo bp_friend_get_total_requests_count(); ?></a><?php endif; ?> </div>
    
    <ul class="dropdown">
        <li id="nav-menu-item-862"><a href="http://sweet.codez.ro/about-us/" rel="nofollow">About us</a></li>
        <li id="nav-menu-item-855"><a href="http://sweet.codez.ro/reasons-to-join/" rel="nofollow">Reasons to join</a></li>
        <li id="nav-menu-item-857"><a href="http://sweet.codez.ro/404-page/" rel="nofollow">404 Page</a></li>
        <li id="nav-menu-item-860"><a href="http://sweet.codez.ro/full-width/" rel="nofollow">Full Width Template</a></li>
        <li id="nav-menu-item-858"><a href="http://sweet.codez.ro/left-sidebar-template/" rel="nofollow">Left Sidebar Template</a></li>
        <li id="nav-menu-item-859"><a href="http://sweet.codez.ro/right-sidebar-template/" rel="nofollow">Right Sidebar Template</a></li>
        <li id="nav-menu-item-830"><a href="http://seventhqueen.com/demo/sweetdatewp/?s=Lorem" rel="nofollow">Search Page</a></li>
        <li id="nav-menu-item-866"><a href="http://sweet.codez.ro/shortcodes/layout/" rel="nofollow">Shortcodes</a></li>
    </ul>
    </li>
    </ul>
    
    
    </li>
    

    And comes out like this :

    #6112
     JohnDoe
    Participant

    ( i closed the tags to but this forum isn’t showing it.. :p )

    #6124
     SQadmin
    Keymaster

    put your code in “pre” html tag to display it and not render it

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #6126
     JohnDoe
    Participant
    This reply has been set as private.
    #6242
     SQadmin
    Keymaster

    Hi, try this:

    1. Replace in header.php “Login buttons” section, around line 127, with the following code:

    COPY CODE
    
    
    <!--Login buttons-->  
    				<div class="eight columns login-buttons">
    					<ul class="button-group radius right">
    						<?php if (is_user_logged_in()): ?>
    							<?php /* Only show if Buddypress is installed */ ?>
    								<?php if (function_exists('bp_is_active')): ?>
    								<li class="relative btn-profile">
                      <div href="#" class="secondary button dropdown" data-options="is_hover:true">
                        <a href="<?php bp_loggedin_user_link(); ?>" class="tiny secondary button radius"><i class="icon-user hide-for-medium-down"></i> <?php _e("PROFILE", 'kleo_framework'); ?></a><div class="kleo-notifications"><?php if( bp_is_active('messages') && messages_get_unread_count() > 0 ) { ?><a href="<?php echo bp_loggedin_user_domain().'messages/'; ?>" data-width="210" title="<?php _e("New messages", 'kleo_framework');?>" class="kleo-message-count has-tip tip-left"><?php echo messages_get_unread_count(); ?></a><?php } ?><?php if (bp_is_active('friends') && bp_friend_get_total_requests_count() > 0): ?> <a href="<? echo bp_loggedin_user_domain().'friends/requests'; ?>" data-width="210" title="<?php _e("Friend requests", 'kleo_framework');?>" class="kleo-friends-req has-tip tip-right"><?php echo bp_friend_get_total_requests_count(); ?></a><?php endif; ?> </div>
                        <ul>
                          <li id="nav-menu-item-862"><a href="http://sweet.codez.ro/about-us/" rel="nofollow">About us</a></li>
                          <li id="nav-menu-item-855"><a href="http://sweet.codez.ro/reasons-to-join/" rel="nofollow">Reasons to join</a></li>
                          <li id="nav-menu-item-857"><a href="http://sweet.codez.ro/404-page/" rel="nofollow">404 Page</a></li>
                          <li id="nav-menu-item-860"><a href="http://sweet.codez.ro/full-width/" rel="nofollow">Full Width Template</a></li>
                          <li id="nav-menu-item-858"><a href="http://sweet.codez.ro/left-sidebar-template/" rel="nofollow">Left Sidebar Template</a></li>
                          <li id="nav-menu-item-859"><a href="http://sweet.codez.ro/right-sidebar-template/" rel="nofollow">Right Sidebar Template</a></li>
                          <li id="nav-menu-item-830"><a href="http://seventhqueen.com/demo/sweetdatewp/?s=Lorem" rel="nofollow">Search Page</a></li>
                          <li id="nav-menu-item-866"><a href="http://sweet.codez.ro/shortcodes/layout/" rel="nofollow">Shortcodes</a></li>
                        </ul>
                      </div>        
    								</li>
    								<?php endif; ?>
    						<li><a href="<?php echo wp_logout_url(get_bloginfo('url')); ?> " class="tiny button radius"><i class="icon-off hide-for-medium-down"></i> <?php _e("LOG OUT", 'kleo_framework'); ?></a></li>
    						<?php else: ?>
    						<li><a href="#" data-reveal-id="login_panel" class="tiny secondary button radius"><i class="icon-user hide-for-medium-down"></i> <?php _e("LOG IN", 'kleo_framework'); ?></a></li>
    						<?php if(get_option('users_can_register')) { ?>
    								<li><a href="#" data-reveal-id="register_panel" class="tiny button radius"><i class="icon-group hide-for-medium-down"></i> <?php _e("SIGN UP", 'kleo_framework'); ?></a></li>
    						<?php } ?>
    						<?php endif; ?>
    					</ul>
    				</div>
    				<!--end login buttons-->
    
    

    2. Add in app.css the following lines:

    COPY CODE
    
    
    /* Profile dropdown button */
    .btn-profile {}
    .btn-profile .dropdown { padding: 0 24px 0 0; border: none; }
    .btn-profile .dropdown:hover { border: none; }
    .btn-profile .dropdown .secondary.button { border: none; }
    
    .btn-profile .button.dropdown:after { border-width: 4px; right: 10px; border-color: black transparent transparent transparent; }
    .btn-profile .button.dropdown > ul { border-color: #e3f4f9; }
    .btn-profile .button.dropdown > ul li:hover a,
    .btn-profile .button.dropdown > ul li:focus a { background-color: #e3f4f9; color: #000 !important; }
    .btn-profile .button.dropdown > ul li .label { font-size: 10px; border-radius: 2px; }
    
    

    Regards,
    Robert

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #6261
     JohnDoe
    Participant

    so many errors in the header code

    #6262
     JohnDoe
    Participant

    Fixed a few but can’t get rid of these

    #6263
     JohnDoe
    Participant
    This reply has been set as private.
    #6315
     SQadmin
    Keymaster

    Code gets screwed sometimes when paste here. Take the code again:
    http://pastebin.com/4fqM3yaG

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 11 posts - 1 through 11 (of 11 total)

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

Log in with your credentials

Forgot your details?