Need to be able to get the attachment link…
-
With my client’s website I need to be able to get the pdf (attachment) link which has been placed into WordPress via Media, and attached it to a download button per page, this enables the user to download a part of that particular page. Anyway here is one part of what I have started:
if (is_page('1.5 Tonne Self-Loading Cable Trailer')) { echo '<div class="download">'; echo '<a href="https://www.domainname.com/wp-content/uploads/2011/11/1-5-tonne-self-loading-cable-trailer.pdf"><img src="<?php bloginfo('template_url'); ?>/images/downloadbtn.gif" alt="Download the 1.5 Tonne Self-Loading Cable Trailer page as a pdf" width="81" height="31" /></a>'; echo '</div>'; }
Thanks in advance.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Need to be able to get the attachment link…’ is closed to new replies.