Hi there, I have a file field called fees_file_upload. I'm trying to provide the file as a download in my page (using Oxygen) but the codse samples given just give me an error. I'm trying to use this snippet:
<?php $files = rwmb_meta( 'fees_file_upload' ); ?>
<h3>Uploaded files</h3>
<ul>
<?php foreach ( $files as $file ) : ?>
<li><a>"><?= $file['name']; ?></a></li>
<?php endforeach ?>
</ul>
But I get the following error:
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/duod37.sg-host.com/public_html/wp-content/plugins/oxygen/component-framework/components/classes/code-block.class.php(133) : eval()'d code on line 4
How can I get the URL of the file to use in my page?