The purpose of checked()
is to output a checked="checked"
attribute based on a current value. By using it the way you’re using it there you’re forcing Si
to never be checked and No
to always be checked.
So what you want to do is use both arguments of checked()
to compare the value of the input to the current value:
<input name="feat" type="radio" value="0" <?php checked( $feat, '0' ); ?> />Si<br>
<input name="feat" type="radio" value="1" <?php checked( $feat, '1' ); ?> />No
With that change if $feat
is '0'
then the first checked will run, and if it’s '1'
the second will run.