$allow_download = get_post_meta( $post->ID, 'lil-allow-download', true ); $checked1 = checked( $allow_download, 1 ); $checked2 = checked( $allow_download, 0 ); <p> <label for="lil-allow-download">' . esc_html__( 'Allow download', 'lil-music' ) . '</label> <input type="radio" name="lil-allow-download" id="lil-allow-download" value="1" ' . $checked1 . '>Yes <input type="radio" name="lil-allow-download" id="lil-allow-download" value="0" ' . $checked2. '>No </p>
WordPress radio metabox code example
Approved. Code works!
This is exactly the working code that is verified by the moderator or site administrators
More
lil-code© | 2022 - 2024
Go Top