Please how do I get mp3 file url so that i can attach it to a custom button i made. I was able to get the post title but cant do that for file url.
I want when I click on download button the download starts immediately not taking me to the post.
See my current code and check screenshot too or site tophits.ng
Please forgive me if i fail on how to ask question. see my current code below
<?php query_posts('cat=1302&showposts=1'); while (have_posts()) : the_post(); ?>
<?php the_post_thumbnail(); ?>
<div style="margin-left:80px;"><h3><font style="color: white;"><u><?php the_title(); ?></u></font><br><br>
<button style="float:left; background-color:black; padding: 3px; color:white; border-radius:5px;"><a style="float:right; background-color:black; color: white;" href="<?php the_permalink(); ?>">VIEW</a></button>
<button style="float:right; background-color:black; padding: 3px; border-radius:5px;"><a style="float:right; background-color:black; color: white; padding: 3px; border-radius:5px;"href="<?php the_permalink(); ?>">DOWNLOAD</a></button>
</h3> <script src="https://tophits.ng/wp-content/cache/min/1/e0d56963d9eb9a71278f066774b009c7.js" data-minify="1" defer=""></script><noscript><link data-asynced='1' as='style' onload='this.rel="stylesheet"' rel="preload" href="https://tophits.ng/wp-content/cache/min/1/31e4b8c01154801046d0c85b7f0cd74e.css" data-minify="1" /><noscript><link rel="stylesheet" href="https://tophits.ng/wp-content/cache/min/1/31e4b8c01154801046d0c85b7f0cd74e.css" data-minify="1" /></noscript></div></li></ul></ul>
<?php endwhile; ?><?php wp_reset_query(); ?>
</div>