Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • in reply to: Custom Top Menu #12475
     DaveKinetic
    Participant

    Thank you! Fixed the issue.

    in reply to: Top bar display #12376
     DaveKinetic
    Participant

    I have the same issue. Would really like to have the menu available on all pages.

    in reply to: Adding notification bubble to menu #12317
     DaveKinetic
    Participant

    I shall give this another go tomorrow. Thanks for the link.

    in reply to: Custom Top Menu #12167
     DaveKinetic
    Participant

    Sorry, another strange one. The top menu does not display on Buddypress pages. I’ve got it set to show. Any idea where this has gone?

    in reply to: Adding notification bubble to menu #12166
     DaveKinetic
    Participant

    I found a tutorial here. My menu is called top-menu

    Copied his code (I think) and came up with this:

    COPY CODE
    if ( is_user_logged_in() && $args->theme_location == 'top-menu')  {  add_filter('wp_nav_menu_items','add_notification_to_custom_menu', 2, 2);
    function add_notification_to_custom_menu( $items, $args ) {
    	$notifications = bp_notifications_get_notifications_for_user( bp_loggedin_user_id() );
    	$count         = ! empty( $notifications ) ? count( $notifications ) : 0;
    	if ($count > 0 ) {
    		$alert = 'alert';
    		$pending = 'pending-count';
    	} else {
    		$alert = 'no-alert';
    		$pending = 'count';
    	}
    	return $items."<li id='menu-bp-notifications' class='menupop'><a href='".bp_loggedin_user_domain()."notifications/'><span id='ab-pending-notifications' class='" . $pending . " " . $alert . "'>".$count."</a></li>";
        
    	return $items;
    }
    }

    That removes the bubble from both though. I know sharmstr is busy, so maybe someone else can see where I am going wrong.

    in reply to: Custom Top Menu #12161
     DaveKinetic
    Participant

    Thank you! That’s exactly what I was looking for.

    in reply to: Adding notification bubble to menu #12153
     DaveKinetic
    Participant

    Sorry to be annoying. Anyway to exclude it from the main menu and only show it in the top menu?

    in reply to: Adding notification bubble to menu #12107
     DaveKinetic
    Participant

    Thank you sir! 🙂

    in reply to: Adding notification bubble to menu #12097
     DaveKinetic
    Participant

    I really want to use this addition, but when I use it i get the following error:

    Parse error: syntax error, unexpected T_STRING in ../wp-content/themes/kleo-child/functions.php on line 29

    The code on that line is return $items."<li id='menu-bp-notifications' class='menupop'><span id='ab-pending-notifications' class='" . $pending . " " . $alert . "'>".$count."";

    in reply to: Theme not Same as LIVE Preview #12079
     DaveKinetic
    Participant

    I’ve put in the text and everything is fine. One thing I can’t understand is how have you set it so the home page has a black transparent background behind the menu that only appears on scroll, and then all the other pages have a solid white background on the menu.

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

Log in with your credentials

Forgot your details?