WordPress Affiliate Manager

Affiliates Management Plugin for WordPress

  • Home
  • Features
    • Screen Shots
  • Download
  • Documentation
  • Addons
  • Support
    • Support Forum
    • Forum Login
    • Forum Registration
    • Contact
    • Premium Addon/Plugin Support

[Resolved] Shortcodes

by

WordPress Affiliate Manager › Forums › Affiliate Manager Plugin › Shortcodes

Tagged: affiliate id, shortcode

  • This topic has 7 replies, 2 voices, and was last updated 5 years, 1 month ago by larute.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • March 6, 2021 at 12:01 am #7212
    larute
    Participant

    Are there shortcodes to display user names, ids, etc. I would specifically like to display the user’s affiliate ID on a page. How would I make his happen?

    March 6, 2021 at 12:08 am #7213
    larute
    Participant

    I’ve tried registering a shortcode like this:

    // Shortcode for User ID
    function nicely_userID_shortcode() {
    $nicelyUserID = $_COOKIE[‘wpam_id’];
    return $nicelyUserID;
    }
    // register shortcode
    add_shortcode(‘nicelyUserID’, ‘nicely_userID_shortcode’);

    But that doesn’t seem to do the trick.

    March 6, 2021 at 12:03 pm #7215
    Shadow Labs
    Keymaster

    @larute, Unfortunately there is no shortcode to do this the moment. You can use this code to get the user ID of the logged-in affiliate: https://wpaffiliatemanager.com/forums/topic/get-current-logged-in-affiliate-id/

    March 8, 2021 at 4:37 pm #7216
    larute
    Participant

    Well, I can register my own shortcode, I just need to know how to reference the Affiliate ID. I saw somewhere that you guys were using wpam_id. Is that right. I just need to find out how to return the afffiliates ID.

    THank you!

    March 9, 2021 at 5:05 am #7218
    Shadow Labs
    Keymaster

    @larute, “wpam_id” is just a cookie that is saved into the user’s browser when they are referred to your site by an affiliate.

    What is Cookie Duration and How to Use it

    March 9, 2021 at 4:46 pm #7222
    larute
    Participant

    Ok, can you give me the php for returning the logged in user’s affiliate ID? Then I can create my own shortcode.

    Thank you!

    March 10, 2021 at 4:12 am #7225
    Shadow Labs
    Keymaster

    @larute, https://wpaffiliatemanager.com/forums/topic/get-current-logged-in-affiliate-id/

    March 10, 2021 at 5:47 pm #7227
    larute
    Participant

    Thank you. That is what I was looking for.

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

Featured Addons

  • WooCommerce Coupon Tracking
  • WooCommerce Product Specific Commission

Copyright © 2026 | WordPress Affiliate Manager | Privacy Policy