-
AuthorPosts
-
January 2, 2020 at 10:16 pm #1169206
As the prior topic shown below was addressed over a year ago with no apparent solution, I am opening a new topic on this matter.
We are using Enfold coupled with PaidMembershipPro, just a the prior writer did. The members who are logged in get the members version of a main menu instead of the site’s non-logged in public menu. While this works just fine in desktop mode, no burger menu appears for the logged-in version of the members menu. The burger menu appears perfectly for the non-logged in users.
I am hoping for one of the Enfold wizards knowledgeable assistance.
Prior topic:
January 3, 2020 at 2:40 pm #1169326Hey,
Could you please create temporary admin logins and post them here privately so we can look into it?
Best regards,
YigitJanuary 3, 2020 at 3:02 pm #1169336This reply has been marked as private.January 3, 2020 at 3:51 pm #1169352January 3, 2020 at 4:46 pm #1170004This reply has been marked as private.January 3, 2020 at 5:01 pm #1170011Hi,
Thanks!
I created a test user and could reproduce the issue.
I think we could solve this by replacing menu for logged in members but we would need conditional tags. I found this page – https://www.paidmembershipspro.com/forums/tag/conditional-tags/ but it seems like you would need to login to see the content. Could you please check if they offer a conditional tag such as “if member logged in”? If so, we can use it in this code – https://kriesi.at/documentation/enfold/menu/#toggle-id-155 and replace “is_user_logged_in”.
Best regards,
YigitJanuary 3, 2020 at 5:07 pm #1170016This reply has been marked as private.January 3, 2020 at 5:19 pm #1170028This reply has been marked as private.January 3, 2020 at 5:32 pm #1170037Hi,
Thanks!
In the meantime, i added following code to bottom of Functions.php file in Appearance > Editor but it did not work as i hoped.
/* Display a different menu for registered users */ add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' ); function my_wp_nav_menu_args( $args = '' ) { if($args['theme_location'] === 'avia') if ( is_user_logged_in() && function_exists('pmpro_hasMembershipLevel')){ if(pmpro_hasMembershipLevel()){ $args['menu'] = 'Member Menu'; } else { $args['menu'] = 'Main Menu'; }} return $args; }
I will ask my teammates to check the thread as well.
Best regards,
YigitJanuary 4, 2020 at 10:43 am #1170212I see where you were going with the code you inserted. Since it did not work for you I have removed it so we get back to where we started.
PMPRO has details on setting this whole thing up at:
If you review their page, I used their method described in OPTION 2 which uses their Nav Menus Add-On. Maybe the method shown in OPTION 1 could be used as a guide for a fix?
Again, as I noted earlier the member menu swap is working for desktop, it’s just mobile that shows no burger menu when logged in as a member. With non-members, both desktop and mobile work as they should.
January 6, 2020 at 1:16 pm #1170671Does anyone have any idea whatsoever why Enfold refuses to show the burger menu for logged-in members under mobile? All is well for desktop when logged-in. Even weirder yet, is the burger menu shows just fine under mobile for non-members. Was hoping to hear back from support quickly since this should be a quick fix.
January 6, 2020 at 2:06 pm #1170693Hi,
I added following code to bottom of functions.php file of your child theme
add_filter('avf_append_burger_menu_location', 'avf_append_burger_menu_location_mod', 10, 1); function avf_append_burger_menu_location_mod($location) { $location = 'avia'; return $location; }
I referred to Ismael’s post here. It seems to be working fine. Please review your website :)
Best regards,
YigitJanuary 6, 2020 at 3:26 pm #1170722Most greatly appreciated Yigit! I’ll keep this in mind for future site builds. Thank you very much for the expert help!
January 6, 2020 at 3:29 pm #1170725 -
AuthorPosts
- The topic ‘Mobile Menu for logged in members not appearing’ is closed to new replies.