Support » Plugin: Custom Content Shortcode » Download url for pdfs

  • I want to loop a list of pdfs in the media library with links to the files. However, I just cannot work out to include a download link to the file rather than the permalink.

    This is what i have:

    [loop type=attachment orderby=date category=annual-report paged=10]<li><a href="[field url]">[field title]</a>[switch category][when pdf] (pdf)[/when][when word] (Word file)[/when][/switch]</li>[content][/loop]

    The only way I can find to use [field download-url] in place of [field url] is to attach all the files to the page and loop them using [attachment]. But I don’t want to attach the files as I have another page where I want another loop through the files, and I can’t attach them to two pages.

  • The topic ‘Download url for pdfs’ is closed to new replies.