WordPress.org

Support

Support » Plugins and Hacks » Switching Featured Image

Switching Featured Image

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, by using conditionals, it is very simple (even if the code can look scary). I am using something like this on my own site:

    [s2If current_user_is(s2member_level0)]<img alt="" src="your image for level0" /></a>[/s2If]
    [s2If current_user_is(s2member_level1)]<img alt="" src="your image for level1" /></a>[/s2If]
    [s2If current_user_is(s2member_level2)]<img alt="" src="your image for level2" /></a>[/s2If]
    [s2If current_user_is(s2member_level3)]<img alt="" src="your image for level3" /></a>[/s2If]
    and so on

    Since the user can only have ONE level, they will always fall into one of the categories you list (making sure you do list all the levels you are using).

    On my site, I use a black and white image of a course they do not have access to, but linked to the sales page, and a colored image if they have access to, linked to the course page (a nice way to advertise what you have to sell!)

    I’ve got a good handle on using conditionals for images WITHIN a post, but I’m referring to the featured image attachment, which is not referenced in the body of the post. My theme puts thumbnails of the featured image for each post on the front page, and I’m wondering if there is a way I can get a different thumbnail to show up depending on the user’s level.

    I’m thinking this would need to be coded into the actual theme…?

    Oh I see. Unfortunately, I don’t know that one (I don’t even know how to get the feature image to appear in the first place, I just have it in the post!)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Switching Featured Image’ is closed to new replies.