I am trying to use this plugin in a slightly different way and perhaps you’d know if and how I can do it.
I am using a php widget (a widget that allows php) because I need to pull the file name dynamically with this code:
<?php the_field('downloadable_material'); ?>
This widget does not allow shortcodes for some reason, but if I use the do_shortcode php line, i can’t seem to insert the php code above inside the shortcode that is inside the do_shortcode php.
Which would end up something like this:
<?php echo do_shortcode('[download]<?php the_field('downloadable_material'); ?>[/download]'); ?>
which obviously doesn’t work.
I am also unable to use the wp-content/force-download.php?file= inside the middle of the link because it pulls the full url as is from the php code the_field I mentioned.
Any other suggestions?
- The topic ‘Forcing download in another way?’ is closed to new replies.