latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

displaying custom field values of sponsor

Home Forums Community Forum displaying custom field values of sponsor

This topic contains 9 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 7 months ago.

Topic Author Topic
Posted: Tuesday May 21st, 2013 at 5:47 am #50281

I am after something in regards to the affiliate pro plugin. Now I understand this is not affiliate pro support but my question is in regards to collecting and displaying custom filed data using s2member.

So if I were to signup to my free site through an existing affiliates URL I am assigned to him. Currently I am pulling info and displaying it in my members office. Things such as name, username, email! However, I this is cookie based and limited to this and using the affiliate pro shortcodes.

What I really want to be able to do is pull the data from a custom field and display it. The custom field data needs to be that of the person who referred me. Not only that, If I could work this out I could do all details this way so it does not drop out, this I want to do using s2memeber.

Does this make sense? Would love any knowledge based on this please.

Just to round it up

.affiliate enters something into custom field in edit profile mode(i can do this)
.affiliate refers somebody else who can see displayed details of there referrer(i can do this but shortcode cookie based)
.new affiliate needs to see custom field value displayed, that of there referrer(im stuck) :)

I have tried everywhere f0r this and nobody can help me.

Many thanks in advance for any feedback :)

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Thursday May 23rd, 2013 at 3:43 pm #50449

Hi Terje.

Sorry, I don’t understand how this ties with s2Member, could you explain? Have you asked Affiliate Pro support about this? I’m not familiar with that plugin at all.

Posted: Friday May 24th, 2013 at 6:03 am #50546

Thanks for getting back to me Cristián.

What I am trying to do is with s2member really. My affiliate plugin basically signs up people under others so for example if I share my link with you as id #3(example) and you register for free to my site, I am classed as your sponsor, you are my referral.

Well, I have used s2memeber to create a custom field which I display in the members area with the s2get shortcode. What I want to see if I can get help in doing is to display in your members area (for example), my custom field value.

So if you were affiliate #4, and there were affiliates #5, and #6 which were both brought in by me affiliate #3 then I would like affiliates #s 4(you),5 and 6 to see MY custom field value and not theres using the s2get shortcode.

Same continues down through though, so if you referred somebody and the were affiliate #12, they would see YOUR custom field value which is tagged to YOU id #4…

And the same for everybody in the members site, they view in their members area a custom field value which is that of their sponsors/upline/referrer… so #5’s referrals would see his/hers custom field value… #6 referrals would see his/her custom field value and so on for everybody!

I like the idea of using the s2get shortcode to display it, I just need somebody to see if they can work out a way to do some code which would tag the code id# of the referrer so we can pull custom field data, well any field data really, name, email, user?!

Does this make more sense Cristián, I do hope so as Im on the verge of site completion with just this obstacle left in my way.

Many thanks again, I look forward to your reply. Have a fab day buddy :)

Posted: Friday May 24th, 2013 at 6:08 am #50547

Just to make things clear on the affiliate id#. it uses that of WP and s2member. The default one so its all working with the same tags and database.

Thanks again :)

Posted: Friday May 24th, 2013 at 9:40 pm #50592

Thanks for explaining it.

I see how it ties with s2Member, because you’re using an s2Member custom profile field, but maybe what you’re trying to do is a customization beyond what the s2Get shortcode does.

Same continues down through though, so if you referred somebody and the were affiliate #12, they would see YOUR custom field value which is tagged to YOU id #4…

So you want that if the user sees the ID of his sponsor? Is that it? And that sponsor’s is the ID that you store in the user’s profile field you created with s2Member? If so, then using s2Get in your page may be enough.

So if I register through your link, and you’re my sponsor (ID 1), the custom field you created for the sponsor ID, in my case would have the value “1” (your ID). Now, what you want is that in a page you created to see my user info, that it displays that my sponsor is the user with ID 1. Is that it?

Posted: Monday May 27th, 2013 at 8:02 am #50707


you sound like you will be able to help me :)

You wouldnt realise the frustration I have had and finally somebody who actually understands what I’m talking of. If you can solve this buddy you get a huge cyber hug lol :)

Yes, I feel we are close.

Here is an example similar to what you have said.

Imagine I have a custom field for the affiliates to fill in called ‘en_username’. To see this I use s2get shortcode, which works nicely as it should. However, I dont want the affiliates to see thier own custom field en_username, I want them to see the custom field of the person who introduced/sponsored them into my website.

So my assumption here would be, because everybody who joins a WP platform get a unique id#, is for the code or shortcode to recognize the id# of the referral and THEN to pull the custom filed of that person. So regardless of who brought in who, this simple code would continue to do the same.

code/shortcode would work out the id# of referrer, then display the custom field en_username, of that id#

so forget the affiliate plugin for now. I am user id#1 as default admin of the wp platform. Well I would like everybody who joins the platform to display a special custom field which I have entered into my user account. But, I would like the code to grab the custom field via grabbing my id# first. This way if I use the affiliate plugin this simple code could/should repeat this regardless of the id#…

I do hope I have not confused things further and I am sure there is a way around, and as added pressure for you, I think you are the man to help me :)

Have a great day buddy, I look forward to your reply.

Posted: Monday May 27th, 2013 at 8:12 am #50708

sorry, also…

I would like to be able to pull any field also, like sponsors/referrers name, email, username! that stuff to, but I figured If we could sort the referrer custom display thingy I could apply that to all fields(maybe) :)

Thanks again.

Posted: Wednesday May 29th, 2013 at 3:10 am #50792

I think I understood what you want, but you’ll need a little bit of custom code to get it.

This function will help:

If that’s not enough, you may want to check the WordPress codex for another function you can use to get more info on the user.

If you need help writing this customization, you could post a job on a freelancers site to get some help form one. E.g.: jobs.wordpress,,

Posted: Friday May 31st, 2013 at 5:03 am #50988

Thanks again for your help Cristián, I will look at this further. I feel I am close now and that I can do this using s2memeber.

Have a great day buddy :)

Posted: Friday May 31st, 2013 at 9:24 pm #51093

Thanks! You too! :)

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.