Skip Navigation

[Resolved] File URL shortenend to actual filename

This support ticket is created 2 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 2 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#2157077

I it possible to only show the actual file name as indicated in the attached screenshot as appose to the full URL. My code below:

<div style="margin-bottom: 10px;"><a class="dwnload" title="download" href="[types field='document-upload' output='raw'][/types]" target="blank" rel="noopener">DOWNLOAD</a> <a title="download" href="[types field='document-upload' output='raw'][/types]" target="blank" rel="noopener">[wpv-post-title]</a></div>

#2157271

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Fleur,

In order to achieve this you will essentially need to strip the URL to get only the file name from the end. Basically custom code will be needed in order to perform this.

If you look at the thread below you will see one of our supporters provided some custom code that can do this.
https://toolset.com/forums/topic/print-out-file-name-in-view-template/#post-17264

Please let me know if this helps.
Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.