Skip to:
Content
Pages
Categories
Search
Top
Bottom

Mega menu for members


  • terrenuit
    Participant

    @terrenuit

    Hi,
    Could I set up a mega menu for members,
    the mega menu constituted by 5 continents ( America, Asia, Europe…), when the users fill their profil, they must to fill their continent, and he will belong to this continent of mega menu.
    is it possible to do that ?
    thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)

  • clickallco
    Participant

    @clickallco

    Sure it’s possible – but you’d have to code it yourself… 🙂 But to help you a bit:

    Make the profile fields you want to have checked first, on where your members are located.

    Otherwise, I think Buddypress has the possibility to loop through the xprofile fields – so something like this to gather your names for the mega menu (This is untested, so test it first before putting it on a production site)

    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
        <?php if ( bp_field_has_data() ) : ?>
            <?php if (bp_the_profile_field_name() == 'YOURFIELDNAME') && bp_the_profile_field_value() == 'checked'){
    	//do something
        	}?>
         <?php endif; ?>
    <?php endwhile; ?>

    Gl


    terrenuit
    Participant

    @terrenuit

    Hi,
    thank you for your reply,
    I am newly in wordpress, could you tell me where will I insert this script ?
    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar