Home › Forums › Pre-purchase Questions › ACF in another Plugin › Reply To: ACF in another Plugin
Hi @marty84
Yes you can use it within another plugin. If you’re looking to sell/distribute that plugin please have a look at: http://www.advancedcustomfields.com/resources/including-acf-in-a-plugin-theme/
As for your code try changing the_field
to get_field
. You’re attempting to save the value in a variable and thus should use get_field since that will return the value rather than the_field that echoes the value.
As a sidenote please try to add all code snippets inside code tags 🙂 You can see the code tag button in the toolbar above the textinput field.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.