• Resolved Elmarie

    (@elmarie)


    Good day

    I’m using the pods template to output my custom field values. I have a multiple file upload field. Each file can have it’s own title. How can I display this title instead of the entire file path?

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hello @elmarie

    Currently this is only possible through PHP, not your template system.
    However, this feature is in progress: https://github.com/pods-framework/pods/pull/5610

    Cheers, Jory

    Thread Starter Elmarie

    (@elmarie)

    Hi Jory

    Thank you for your reply.

    Can you please explain how I can display it via php in my template file? I really need to display the file names.

    Also, instead of using the pods template file how can I then display the different fields in my template file with php code?

    Thank you.

    Plugin Author Jory Hogeveen

    (@keraweb)

    You could create a custom theme template.
    An image (attachment) in WordPress is a post type so you could get the related post data by getting the attachment image. See get_post_meta() to fetch the related images by field name and get_post() to get the image fields. After that you can use wp_get_attachment_image() to display the actual image.

    Keep in mind that these functions are all WordPress and not Pods.

    If you still want to use Pods Templates you could create a custom PHP function and attach it to a “dummy” magic tag like this:
    {@tag_name,function_name}

    Keep in mind that both solutions require some experience with PHP.

    Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘File Name’ is closed to new replies.