WordPress - can't get value from metabox in custom post type
Ok, so I've fiddled a bit with your custom post type and it works for me.
I've created a page template to output all the posts from the poslovi-newsletter
post type. The php part looks like this:
<?php$args = array( 'post_type' => 'poslovi-newsletter', 'posts_per_page'=>-1,);$posts = new WP_Query( $args );$out = '';if ($posts->have_posts()){ while ($posts->have_posts()){ $posts->the_post(); $meta = get_post_meta($post->ID); $out.= '<div class="test">'.$meta['meta-textarea'][0].'</div>'; }}else{ echo '<p>' . __('No Posts Found.') . '</p>';}?><?php echo $out;?>
So your post meta value is in an array that has, among other things key with the name meta-textarea
, and in that key the value is an array that has a single key with your desired value
Array ( [meta-textarea] => Array ( [0] => Tessst ))
I've typed in 'Tessst' to check if it's working.
Hope this helps :)