Php for three levels, not logged in, Logged in non-supporter, logged in supporter

Hi everyone -

I'm trying to code a theme to have three options for an advertisement based on the users status.

I want slider A to display when the user is not logged in at all.
I want slider B to display when the user is logged in but is not a supporter.
I want slider C to display when the user is logged in and has supporter status.

I tried this, but it didn't work:

if (is_supporter_user()) {

					elseif (is_user_logged_in()) {


Is this possible to do? I've been at this for 5 hours and I'm ready to reach out for help..

Thanks so much in advance!

  • skishopmatt

    Vaughan -

    Thank you SO much! I knew I had to be fairly close :slight_smile: Really appreciate it!

    I do have a follow up question also.

    We offer 5 pro site levels and a free option (6 in total) - Is there a way to show different content based on that as well? I wasn't sure how specific we could get, but that would be incredible if we were able to do that.

    Any advice and ideas would be very welcome.

    Thanks again!


  • skishopmatt

    Hi again -

    Well, I tried it this morning and I couldn't seem to get it to work.. I'm wondering if maybe pro-status isn't attached to a member but only a site.

    I'll explain further what I am trying to do.

    On the main sites home page I want to show a message based on the users status. It's not on their own site, it's on the main site of the network. I've tried every combination I can think of and I keep hitting a dead end.

    Here's the test code I'm using:

    		if (is_user_logged_in()) {
    		    if(is_pro_site()) {
    		echo 'You are a member';
    				 } else {
    			echo	'logged in not member';
    				} else {
    			echo	'Not Logged in';

    It doesn't seem to matter if the user is a paid member or a free member, I keep getting the "logged in not member" message.

    Is it possible to do what I'm trying to do?

    My goal is to only show a discounted upgrade message to folks that have accounts but are not yet members, I don't want members that have already paid to see the discount. And I don't want non-logged in members to see the discount.

    In an ideal world, I'd like to take it a step further and have only Free (unpaid members) and the first two levels of pro sites see the message (and not the top 3 levels).

    Anyway.. any ideas or suggestions would be wonderful.

    Thank you again in advance for your time!


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.