Possible to do another shortcode inside of Affiliates shortcode?

โ€”

by

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?
Thanks!


Comments

3 responses to “Possible to do another shortcode inside of Affiliates shortcode?”

  1. 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.

    1. 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. 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?

Share