Possible to do another shortcode inside of Affiliates shortcode?

Posted in

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?

3 Responses to Possible to do another shortcode inside of Affiliates shortcode?

  1. anthony June 18, 2013 at 8:51 am #

    Sorry man!

    Here it is: http://pastebin.com/RfEWWCsN

    Inside that field is the shortcode to display a specific
    Page with affiliate link , like we talked about on twitter.

    • kento June 18, 2013 at 9:54 am #

      No problem 🙂

      Basically just use the API function directly, like:

      if ( affiliates_user_is_affiliate( get_current_user_id() ) ) {
      echo do_shortcode( get_field( 'field_name' ) );

      Posted here with the php tags: http://pastebin.com/2JHvqgE1

  2. kento June 18, 2013 at 8:13 am #

    Hi Anthony, I’ve tried to make sense of what the filter left of the code but couldn’t 😉 Can you please post a version of the full code on pastebin please?

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account