Hey Kento! I’m currently trying to basically do this:
(edited: code crippled by filter, please create a version of it here)
I’m also using the Advanced Custom Fields plugin, and the get_field content of ‘affiliate_code’ is the affiliate’s unique url to share. This way I can edit this in admin instead of having to edit the template every time. Can this be done somehow?