Answer the question
In order to leave comments, you need to log in
Image as background via php?
How to display image as background with this code?
<?php if(!empty($wo['story']['postFile'])) { ?>
<?php
$media = array(
'type' => 'post',
'storyId' => $wo['story']['id'],
'filename' => $wo['story']['postFile'],
'name' => $wo['story']['postFileName'],
'postFileThumb' => $wo['story']['postFileThumb'],
);
echo Wo_DisplaySharedFile($media);
?>
<?php } ?>
style="background-image:url('<?php echo Wo_DisplaySharedFile($media); ?>')">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question