Passer la navigation

[Résolu] File URL shortenend to actual filename

This support ticket is created Il y a 4 years. 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 -

Fuseau horaire du supporter : America/Jamaica (GMT-05:00)

Ce sujet contient 1 reply, a 2 voices.

Dernière mise à jour par Shane Il y a 4 years.

Assisté par: Shane.

Auteur
Publications
#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;">DOWNLOAD [wpv-post-title]</div>

#2157271

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: 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