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
Copy file name to clipboardExpand all lines: docs/usage/acf.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -389,7 +389,7 @@ If the option you are checking against is an array, you can pass the array key a
389
389
`@options` acts as a helper for handling repeater and group fields within' your theme options. Under the hood, it is essentially the exact same as `@fields` and `@group` except it automatically has the theme options ID `'option'` passed to it. It can be closed using `@endoptions`.
390
390
391
391
```php
392
-
@hasoption('social')
392
+
@hasoptions('social')
393
393
<ulclass="social">
394
394
@options('social')
395
395
<li>
@@ -404,5 +404,19 @@ If the option you are checking against is an array, you can pass the array key a
404
404
</li>
405
405
@endoptions
406
406
</ul>
407
-
@endoption
407
+
@endhasoptions
408
+
```
409
+
410
+
## @hasoptions
411
+
412
+
`@hasoptions` is a simple conditional checking if a parent field from your theme options (such as Repeater or Flexible Content) has any rows of data to loop over. It can be closed using `@endhasoptions`
0 commit comments