[Résolu] types_get_field adds extra character for default option
This support ticket is created Il y a 5 années et 7 mois. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
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.