I am using Redux Framework for Wordpress theme. Then upload logo from redux options panel.
array(
'id' => 'opt_header_logo',
'type' => 'media',
'url' => true,
'title' => __('Logo', 'demo' ),
'compiler' => 'false',
'subtitle' => __('Upload your logo', 'demo' ),
'default' => array('url' => IMAGES . '/logo.png'),
),
<?php if($redux_demo['opt_header_logo']['url']!='') { ?>
<img alt="" src="<?php bloginfo('template_directory'); ?>/images/logo.png">
<?php } else { ?>
<img src="<?php global $redux_demo; echo''.$redux_demo['opt_header_logo']['url']; ?>">
<?php } ?>
i want to display default image if image is not uploaded. this code is display uploaded image perfectly but when i delete uploaded image from redux option default image is not showing.
Please help ?
Thanks
ok finally i got the answer and my code is working fine.
<?php global $redux_demo; if($redux_demo['opt_header_logo']['url']!='') { ?>
<img src="<?php echo $redux_demo['opt_header_logo']['url']; ?>">
<?php } else { ?>
<img alt="" src="<?php bloginfo('template_directory'); ?>/images/logo.png">
<?php } ?>