[Gelöst] types_get_field adds extra character for default option
This support ticket is created vor 6 Jahren, 2 Monaten. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
I have a select field (see screenshot 1) with a range of values set.
I also have the following function to create a set of filters of the values from that field for the purposes of filtering posts in a view based on the value of the interval field:
Now take a look at screenshot 2. There's a random W in there. I've managed to work out that it's something to do with the default field. I can change the default value, and the W moves. Question is, how can I stop it showing up??
I also tried changing to the no default option, but then I get an N at the end instead...
Ahh- I was about to comment and say that your solution didn't work- but noted that the interval is stored lowercase, and your solution has it uppercase. Changing it to
if($value != "w"){
works. Bit of a strange workaround but nothing new.