문제

I am using the Advanced Custom Fields plugin with the options add on.
How can I use the value of a field from options in a plugin?
I have a simple php file in the plugins folder that needs to get this value. Is that possible?

도움이 되었습니까?

해결책

For anyone searching for the solution:

Suppose your options field is a text field named "my_option_field_01".

In your php, if you wanted to display the value of that option field inside of a paragraph tag, you would put this:

<p><?php echo get_field('my_option_field_01', 'option'); ?></p>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top