You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You may have a textarea or WYSIWYG field in which you wish to support shortcodes. You could pass the retreived value through the `do_shortcode` function, but with ACF Fluent there is a better way. The `shortcodes` method will instruct ACF Fluent to call the WordPress `do_shortcode` function on the retrieved value automatically:
216
+
217
+
```php
218
+
use Samrap\Acf\Acf;
219
+
220
+
$content = Acf::field('wysiwyg')
221
+
->shortcodes()
222
+
->get();
223
+
```
224
+
225
+
If the field value is not a string, a `\Samrap\Acf\Exceptions\RunnerException` exception will be thrown.
226
+
213
227
#### `Samrap\Acf\Fluent\Builder::raw(void)`
214
228
215
229
When retrieving a field, ACF lets you specify whether or not to format the value from the database. ACF Fluent follows the plugin's convention by formatting the field by default. You may use the builder's `raw` method to retrieve the value from the database unformatted:
0 commit comments