Show content from different membership

I would like to show some content between memberships, I am trying to build a graphical interface for my client that uses membership 2. Is there a way that I can display images of the different memberships and have the images greyed out if they do not belong to the group.

I'm wondering if there is any way to do it without Protect content: [ms-protect-content id="_"][/ms-protect-content]

  • Nithin
    • Support Wizard

    Hi Peter,

    Could you please enable support access to your site, so that we could see have the memberships are currently listed in the /membership page?

    Just to be sure, whether I understand your workflow, you want to list images for each membership in the /membership page, and want to grey the membership images for if they don't belong to a specific membership, right?

    You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    Please let us know once you enable access, so that we could get this sorted. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Ash
    • WordPress Hacker

    Hello Peter

    As Nithin asked, we need some more information about the workflow. So, would you please reply what Nithin asked?

    Just to be sure, whether I understand your workflow, you want to list images for each membership in the /membership page, and want to grey the membership images for if they don't belong to a specific membership, right?

    Or do you just want a single page where you will add your own custom content images and define which is for which membership? Would you please explain a bit more about this?

    Have a nice day!

    Cheers,
    Ash

  • Peter
    • Flash Drive

    Ash,

    Sorry for the poor communication. The statement is exactly what i want. I need to show all the images of all the memberships on a page - and if the user has the membership the image is displayed in color; otherwise the image is grey-scaled. If there is way to add a css class to the memberships available -i can do that.

  • Ash
    • WordPress Hacker

    Hello Peter

    I need to show all the images of all the memberships on a page

    Do you mean to have each of their membership represented with an image, so when you go to the available memberships page it will show your current membership in colored image while others would be greyed out?

    If there is way to add a css class to the memberships available -i can do that.

    On the body tag, there is a class added when a member is logged in. The class is "ms-{membership_id}"

    So for example, if you have a membership which ID 345, and a member of that membership is logged in, then the class with be "ms-345"

    And then if your image container class is, for instance, m2-img, then you can use like this:

    .ms-345 .m2-img{
    # add your css here
    }

    Is that something you want?

    Have a nice day!

    Cheers,
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.