@@ -91,6 +91,7 @@ function display_rich_snippet( $content ) {
91
91
$ item_event_local = get_post_meta ( $ post ->ID , '_bsf_item_event_local ' , true );
92
92
$ item_event_region = get_post_meta ( $ post ->ID , '_bsf_item_event_region ' , true );
93
93
$ item_event_postal_code = get_post_meta ( $ post ->ID , '_bsf_item_event_postal_code ' , true );
94
+ $ item_pro_image = get_post_meta ( $ post ->ID , '_bsf_item_pro_image ' , true );
94
95
$ item_pro_name = get_post_meta ( $ post ->ID , '_bsf_item_pro_name ' , true );
95
96
$ item_pro_price = get_post_meta ( $ post ->ID , '_bsf_item_pro_price ' , true );
96
97
$ item_pro_cur = get_post_meta ( $ post ->ID , '_bsf_item_pro_cur ' , true );
@@ -112,6 +113,10 @@ function display_rich_snippet( $content ) {
112
113
$ review .= '<div class="snippet-image"><img width="180" src=" ' . esc_url ( $ item_recp_photo ) . '" alt="recipe image"/></div> ' ;
113
114
$ review .= '<div class="aio-info"> ' ;
114
115
}
116
+ if ( 'item_product ' == $ item_review_type ) {
117
+ $ review .= '<div class="snippet-image"><img width="180" src=" ' . esc_url ( $ item_pro_image ) . '" alt="recipe image"/></div> ' ;
118
+ $ review .= '<div class="aio-info"> ' ;
119
+ }
115
120
if ( 'item_video ' == $ item_review_type ) {
116
121
$ review .= '<div class="snippet-image"><img width="180" src=" ' . esc_url ( $ item_video_thumb ) . '" alt="Video Image"/></div> ' ;
117
122
$ review .= '<div class="aio-info"> ' ;
@@ -213,6 +218,7 @@ function display_rich_snippet( $content ) {
213
218
}
214
219
$ review .= " <div class='snippet-data'><span itemprop='name'> " . esc_attr ( stripslashes ( $ item_pro_name ) ) . '</span></div> ' ;
215
220
}
221
+
216
222
if ( '' != trim ( $ item_pro_price ) ) {
217
223
218
224
if ( '' != $ item_product ['product_price ' ] ) {
@@ -229,7 +235,12 @@ function display_rich_snippet( $content ) {
229
235
}
230
236
$ review .= '</div> ' ;
231
237
}
232
- $ review .= '</span> ' ;
238
+
239
+ if ( '' != trim ( $ item_pro_image ) ) {
240
+ $ review .= '<meta itemprop="image" content=" ' . esc_attr ( $ item_pro_image ) . '"> ' ;
241
+ }
242
+
243
+ $ review .= '</span></div> ' ;
233
244
}
234
245
if ( 'item_recipe ' == $ item_review_type ) {
235
246
$ item_recipe = get_option ( 'bsf_recipe ' );
0 commit comments