Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

emmeber user id php shortcode

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › emmeber user id php shortcode

  • This topic has 14 replies, 3 voices, and was last updated 10 years, 2 months ago by wrcaccess.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • February 24, 2015 at 6:41 pm #12265
    wrcaccess
    Spectator

    I’d like to add member user id in php page. What’s the shortcode for it? Appreciate it.

    February 24, 2015 at 9:42 pm #68747
    wzp
    Moderator

    Please see this:

    https://support.tipsandtricks-hq.com/forums/topic/how-to-retrieve-and-show-a-particular-info-of-the-logged-in-member

    February 25, 2015 at 6:33 am #68748
    wrcaccess
    Spectator

    I couldn’t find it. I’d appreciate if I can find a php code for

    [wp_affiliate_referrer]

    Many thanks!

    February 25, 2015 at 1:48 pm #68749
    wzp
    Moderator

    I’d appreciate if I can find a php code for

    [wp_affiliate_referrer]

    $value = do_shortcode(‘[wp_affiliate_referrer]’);

    I couldn’t find it.

    You asked for something else, before.

    February 25, 2015 at 3:23 pm #68750
    wrcaccess
    Spectator

    Yes sorry, I did. My mistake.

    Can I add this code to a link?

    example.com/?ref id=$value = do_shortcode(‘[wp_affiliate_referrer]’);

    Is this the right format or should I enclose it with < >

    Sorry, I don’t know how to do this. If you can show me…

    February 25, 2015 at 4:01 pm #68751
    wzp
    Moderator

    You need to “construct” the link in PHP, before it can be usable. Do you actually know how to program in PHP?

    February 25, 2015 at 6:28 pm #68752
    wrcaccess
    Spectator

    I use the regular shortcode on the wordpress page as

    [http://www.example.com/?ref_id=[wp_affiliate_referrer]]

    I’d like to append the ref short code with a php version of it.

    I don’t know how to program in php, hence the request..

    February 25, 2015 at 8:05 pm #68753
    wzp
    Moderator

    What exactly, big picture, are you trying to accomplish?

    February 25, 2015 at 9:53 pm #68754
    wrcaccess
    Spectator

    On the php page, I want to place a ref_id link, which I can currently do on wp pages.

    mysite.com/?ap_id=([wp_affiliate_referrer])

    All I need is a PHP shortcode to display ([wp_affiliate_referrer]) in the correct format with the entire link as I cannot discern partial tags.

    February 26, 2015 at 1:20 am #68755
    admin
    Keymaster

    You can call the following function to retrieve the referrer details (if any):

    wp_affiliate_get_referrer()

    I don’t know how you are using it in your PHP code but the above function will only be available after the plugins have loaded. So you may need to use the plugins_loaded WordPress hook to delay the execution of your code.

    February 26, 2015 at 4:22 am #68756
    wrcaccess
    Spectator

    Sir, can you add that function inclusive of the referral link.

    wp_member has links like this

    [http://www.mysite.com/?ap_id=wp_affiliate_get_referrer()]

    Can you have that corrected? That is all I ask so it works on the php page.

    February 26, 2015 at 11:32 pm #68757
    admin
    Keymaster

    I am still not sure what you are really trying to do. This is some kind of a custom stuff you are doing. You will need to go via the following route:

    https://support.tipsandtricks-hq.com/need-custom-work-done

    March 1, 2015 at 2:46 am #68758
    wrcaccess
    Spectator

    Admin, this is the confusion. All I am asking is the link below placed on a wordpress page, how can the same link be placed on a php page? I just need the wp_affiliate_get_referrer in a php version but with the entire link demonstrated so I can just cop and paste. Hopefully I am clear about this now. Many thanks!

    need a php translation of the link below.

    [http://www.mysite.com/?ap_id=[wp_affiliate_get_referrer]

    March 1, 2015 at 4:52 pm #68759
    wzp
    Moderator

    I told you way back on the first page how to get the affiliate ID using PHP.

    $value = do_shortcode('[wp_affiliate_referrer]');

    If you want to reconstruct the complete affiliate URL then use:

    $mylink='http://mysite.com?ap_id='.do_shortcode('[wp_affiliate_referrer]');

    March 1, 2015 at 11:31 pm #68760
    wrcaccess
    Spectator

    WZP, many thanks. thank you once again to you and admin,

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ