Multiple PDF uploads in group on a page > Show last one on frontend

Support General Multiple PDF uploads in group on a page > Show last one on frontend

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33939
    SteevnSteevn
    Participant

    Hi,

    As the title hopefully already kind of explains, I'm looking for a way to display the last PDF uploaded in a group field on the page itself.
    I have a page on which someone can upload 1 PDF file using File Advanced. I am able to show them using a repeater (I'm using Oxygen Builder for this matter) as just a list with you being able to click on them ans it shows the link to the PDF. But I would like the last PDF uploaded to be seen in the frontend, above the archive.
    I'm using the Mozilla PDF viewer to show the PDF at the moment.

    Hope someone can help me here.
    Thanks!

    #33940
    SteevnSteevn
    Participant

    An example: https://i.postimg.cc/5y7L4Jn8/example.jpg

    #33955
    Long NguyenLong Nguyen
    Moderator

    Hi,

    With the code, you can use the function array_pop() to get the latest file to show.
    https://www.php.net/manual/en/function.array-pop.php

    Refer to this documentation https://docs.metabox.io/fields/file-advanced/#template-usage

    In case of using Oxygen Builder, please reach out to them if you have any issues with installation, configuration, compatibility, or usage.
    Refer to our support policy https://support.metabox.io/topic/support-policy/

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.