0

I'm working on a theme for a company and they don't want the users to touch the code at all. So as I love, they asked me to use Customizer API.

Now, there's a PHP file in the theme which we don't call anyone but on a MailChimp form, via AJAX. So basically, this PHP file is inside /inc/helper/mailchimp.php file but only gets called by an AJAX script.

So is there any way to render Customizer value inside the form? And the value will MailChimp API key so we don't want this to appear anywhere in the source code.

Anyone knows a way to do this? I have completed the entire theme and I just need to finish this. :)

3
  • 1
    Don't load theme files directly, see this answer for an alternative.
    – Milo
    Commented Jul 22, 2015 at 20:32
  • Thanks, it worked! For those who try, if it doesn't work then navigate to Settings > Permalinks, and click on "Save" button, and then try again. Thanks again. :) Commented Jul 26, 2015 at 21:34
  • As Milo pointed out, you can find the answer [at this link][1]. :) [1]: wordpress.stackexchange.com/questions/126572/… Commented Jul 26, 2015 at 21:35

1 Answer 1

0

Coming back to this thread after five years as it's still wasn't marked as answered. Milo in the comments pointed out the answer: Trying to avoid including wp-load.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.