Home Forums Front-end Issues Checkboxes not checked in frontend


Checkboxes not checked in frontend

  • Hi there!
    I got a problem, i thougt i could manage myself but i am not.

    I want to have several checkboxes under the new post in the admin area. Right under the content area. I have done this and i am fine with this. But now i want to read out the database with the checked and unchecked boxes. therefore i called the these functions in the wp loop.

    $wozi = get_post_meta( $post->ID, 'Wohnzimmer' );
    $essen = get_post_meta( $post->ID, 'Essbereich' );
    $kue = get_post_meta( $post->ID, 'K├╝che' );


    to read this out, i used eg.:

    <?php if ($wozi=1) { echo "<img class='check-prop' src='' alt='wohnzimmer' width='10px' height='10px'>";}?>

    Now every single value is checked not only the ones beeing checked in the backend.
    I cant find the mistake! Help please!

Viewing 1 post (of 1 total)

The topic ‘Checkboxes not checked in frontend’ is closed to new replies.