Hello
I’ve got a post_type with value:
title, desc, kind, image
I can get all custom value to array from this post_type, but i can’t get information about “image”, only i can get the numerical value from image…
I want get all custom value with image value to one loop. This is the code:
$args = array(
'posts_per_page' => 5,
'offset' => 0,
'category' => '',
'orderby' => 'post_date',
'order' => 'DESC',
'include' => '',
'exclude' => '',
//'meta_key' => '',
//'meta_value' => '',
'post_type' => 'wiadomosc',
'post_mime_type' => '',
'post_parent' => '',
'post_status' => 'publish',
'suppress_filters' => true,
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'pokaz_na_glownej',
'value' => '1',
'compare' => '='
),
array(
'key' => 'pokaz_na_glownej_slideshow',
'value' => '1',
'compare' => '='
)
)
);
$posts_array = get_posts( $args );
foreach ( $posts_array as $post ) : setup_postdata( $post );
// $all_key_value have a custom field value, except image information
print_r ($all_key_value = get_post_meta( get_the_ID(), '', false ));
endforeach;
wp_reset_postdata();
Could you help me?