Dear customer support,
I have added custom fields to the product tags. In particular a single image. I would like to receive that image URL inside a functions.php method. However, I can not receive the URL from the field. How can I access the image URL?
add_action('wp_head', 'receive_image_url'); function receive_image_url(){ $image = rwmb_meta( 'single_image_qn1rks1dhnn', array( 'size' => 'thumbnail' ) ); //doesn't get anything $test = rwmb_the_value( 'single_image_qn1rks1dhnn', array( 'size' => 'thumbnail' ) ); //doesn't get anything $key_1_values = get_post_meta( get_the_ID(), 'single_image_qn1rks1dhnn', true ); //receive an array
echo "URL: " . $image['url'] . "TEST: " . $key_1_values; //echo "<style>.term-" . get_queried_object_id() . " .page-title-default { background-image: url(/wp-content/uploads/aktuelles2-header-background.jpg);} </style>"; }
Thanks