Change rendered content in template I created a custom node template in order to change what fields are generated.

  &lt;?php
        print render($content['field_pdf']);

        ?&gt;


The above php code renders the following html:

&lt;div class="field field-name-field-pdf field-type-file field-label-hidden field-wrapper"&gt;&lt;span class="file"&gt;&lt;img class="file-icon" alt="" title="application/pdf" src="/modules/file/icons/application-pdf.png"&gt; &lt;a href="/sites/default/files/testmanual.pdf" type="application/pdf; length=1607045"&gt;lindamanual.pdf&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;


The problem is I only want the href to be rendered (not the image and the outer div). How can I do this?
In the display settings of your field, you can choose to display the "Rendered Content" (what you actually have) or only the URL of the file ("URL to file"). This should only give you the file URL.