• <?php
    $post_id = $wpdb->get_var(“SELECT meta_value from wp_postmeta WHERE meta_key=’slideimage'”);
    foreach ($post_id as $post) {

    echo $post_id->meta_value
    }

    ?>

    It doesn’t output anything, when I check with print_r, this is what I get:
    Array ( [0] => stdClass Object ( [meta_value] => slide143.png ) [1] => stdClass Object ( [meta_value] => slide2.png ) ) 1

    I want basically out the value of the image file. The meta_value.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Why is this not working? For loop output’ is closed to new replies.