I have a file called Portfolio.zip in my Media Library which will always have this name.
Now in my page template I need the url to this file. I can achieve this via his id : wp_get_attachment_url( $attachment_id ); but I would like to get the URL by the name "Portfolio.zip" as I know for sure this will always be the same.
My Code:
<div class="row">
<div class="col-md-12 text-center">
<a id="download" class="vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-rounded vc_btn3-style-modern vc_btn3-color-grey"
href="<?php echo wp_get_attachment_url( 2582 ); ?>" title="Download Portfolio">Download My Portfolio</a>
</div>
</div>
Any Ideas?
Grts, Nanou