Shortcode help
-
Hi I need help with some custom shortcode.
<?php echo do_shortcode('[download file="readme.txt" title="title"]') ?>
This is the shortcode that displays an email form which gives a file download when a form is submitted.
I would like to add an option to add the file dynamicaly.
<?php $downloadfile = get_post_meta( get_the_ID(), '_staff_dlfile', false ); foreach ( $downloadfile as $att );?> <a href="<?php echo wp_get_attachment_url( $att );?>" target=_blank">Download test file here...</a>
This is the code that I am using to allow the file to be downloaded.
But it is always available for download. Is there a way to combine this two code segments to get the one that does the trick?Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Shortcode help’ is closed to new replies.