• Hello everyone, I created a form using the WpForms plugin to upload files in a specific custom folder that has the name of the user who logged in. I would now like to give the possibility to the various users who access the site to see that folder with the content of the files. Is it possible in your opinion from code and/or create a page that does it so that I can call it on my site?


    Thanks for the help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Nearly anything is possible with WP if you’re willing to custom code something. Do you want this file listing to appear in the front end or back end?

    For a back end list, you can add an admin menu item. The callback passed to add_menu_page() can output any sort of content you like. You can use PHP’s scandir() to get an array of files in a particular subdirectory, then use the array to generate the listings you want.

    For a front end page, the solution depends on the type of theme you use (classic or block). Either way, you’d create a custom template file for the purpose. In classic themes, appropriate PHP code can be placed right in the template file. In block themes, create a custom pattern for your PHP code, then include that pattern in your template file.

    Thread Starter amministratore01pi

    (@amministratore01pi)

    Hi, thanks for the suggestions.
    I’ll see which way to go and if I can’t, I’ll think about finding a plugin that can work for me.

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