function italy_menu( $menu1, $menu2 ){
ob_start();
$menuatts = shortcode_atts(array(
'menu_image' => '',
'menu_title' => '',
'menu_money' => '',
), $menu1 );
?>
<div class="post">
<a href="#"><img src="<?php echo $menuatts['menu_image']; ?>"/></a>
<div class="wrapper">
<h5><a href="#"><?php echo $menuatts['menu_title']; ?></a></h5>
<span><?php echo $menuatts['menu_money']; ?></span>
</div>
</div>
<?php
return ob_get_clean();
}
add_shortcode('menu','italy_menu');
if(function_exists(vc_map)){
vc_map(array(
'name' => 'Italy Food Menu',
'base' => 'menu',
'params' => array(
array(
'param_name' => 'menu_image',
'type' => 'attach_images',// How to show image on front page.
'heading' => 'Menu Image'
),
array(
'param_name' => 'menu_title',
'type' => 'textfield',
'heading' => 'Menu Title'
),
array(
'param_name' => 'menu_money',
'type' => 'textfield',
'heading' => 'Menu Money'
),
)
));
}
How to show image on front end WordPress page by visual composer ? I want to show image on my front-end by visual composer. I am using > 'type' => 'attach_images',
But its not showing the image... Here is my code.