Skip Navigation

[Resolved] Display filename from url saved in custom field

This thread is resolved. Here is a description of the problem and solution.

Problem:
Want to display file name instead of file url in content template.

Solution:
To display filename, please try this custom shortcode:
https://toolset.com/forums/topic/print-out-file-name-in-view-template/#post-17264

This support ticket is created 7 years, 2 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 6 replies, has 2 voices.

Last updated by marcB-6 7 years, 2 months ago.

Assisted by: Noman.

Author
Posts
#570983
Screenshot_16.png

I have custom post type called "Events"..It is having custom field for adding document link..check attached screenshot
Now, from that link I want to display file name...

for example,
link : hidden link
I would like to have : agenda-1.pdf

How to make this happen

#571004

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Marc,

Thank you for contacting Toolset support. Where you want to display file name? On front-end in a View/CT OR at back-end where you have uploaded the file (in types input field)?

To display file name on front-end, please try this custom shortcode:
https://toolset.com/forums/topic/print-out-file-name-in-view-template/#post-17264

Thank you

#571034

I would like to display it in content template

#571054

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

ok great, then the custom shortcode in the above ticket link should work good for you.

Please use that one and let us know how it goes. Thanks

#571261

its working

#571397

thanks

#571398

ok