i am trying to do something like this in a loop:
(I removed the < >, so it is not displayed as an image here)
$query = new WP_Query( array( 'post_type' => 'bild' ) );
in the Loop:
$bild = rwmb_the_value($field_id = "url_", $echo =false);
echo 'img src="', $bild, '" /';'
I have two questions. First of all $echo = false does not work for me.
Everytime the Url is output into the HTML instead of just being returned to the variable.
How can I fix this?
Apart from the echo issue the first version is working, but i would prefer to use rwmb_the_value/rwmb_meta to get the url of a image that is selected by the advanced image field. So I my client can choose an image directly instead of having to search for the url. So to say:
So in the end I tried to use the shortcodes instead and the problem vanished. Everything is just displayed once. The documentation says that the shortcode and the the_value function do the exact same thing? In my case they definitely did not!