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
I have a CPT pod with a field of type plain number. When I fetch the pod and output the entries using field() (not display()), values of the plain number field are shown as strings rather than integers.
Might be an enhancement for this field, but keep in mind that metadata is allways a string in WP.
A quick fix would be to parse it as an int: (int) $pod->field( 'counter' )
I have a CPT pod with a field of type
plain number
. When I fetch the pod and output the entries usingfield()
(notdisplay()
), values of the plain number field are shown as strings rather than integers.The output of
var_dump
would bestr(1) "3"
instead ofint(3)
.The field in concern is also set to
Make field "Read Only" in UI
in the advanced field settings as the value should be manipulated programmatically.The text was updated successfully, but these errors were encountered: