im trying to save different value of radio buttons on same name, it works and was able to make checked appear if the correct value is saved.
As you can see on the screenshot ABOVE (which is taken on view-source:), it the correct selected input is CHECKED already however even if it’s check you can see on the screenshow BELOW that it doesn’t display as checked.
It’s already checked but not displaying , i dont know
In the WordPress back-end you have to use
checked="checked" (stricter XHTML), because the CSS will not be applied otherwise:
<input type="radio" name="colors" id="blue" checked="checked">
this is the CSS that applies the blue dot:
WordPress already provides a function for this checked()
<input type="radio" name="colors" id="blue" <?php checked( 'red', get_option( 'color' ) ); ?> />
so you dont have to do an
I think you can Also try it checked=”checked” some time issue with checked so just try it.
Thanks a lot everyone for all your time! I really appreciate it!
I’ve finally found what’s causing it to appear and it’s because i forgot to remove the old sets of radio buttons with the same id as that on a different meta box.
I’ve finally fixed it!