• Hi,

    I would like to add a page to my wordpress site that basically just lists a directory on my server. (Ex. /wp-content/data/)

    Is there some PHP or HTML code that will help me do this? Is it possible to have all of the files listed linked to themselves?

    Thanks!

Viewing 15 replies - 1 through 15 (of 19 total)
  • im not sure if i understand exactly what you want / need

    Thread Starter th3gh05t

    (@th3gh05t)

    I have files that are in a directory. And I need some sort of script that will list all of them, and have them linked.

    I have over 200 small files that I don’t want to type out and link them.

    Is there some sort of script?

    Thread Starter th3gh05t

    (@th3gh05t)

    Exactly. Something like that. But more like this:
    https://brokedownmelodies.com/BrushfireFairytales/

    Can you help?

    well i took another script and just modded it a little to fit inside wordpres

    ill zip up the couple files i have and upload them if you want to work with what i have and just edit it to your needs

    ok here it is, i hope that i made the instructions simple enough ??

    https://www.heathersblog.com/directory.zip

    Thread Starter th3gh05t

    (@th3gh05t)

    wow! thank you!

    did you use it?

    I have used it and it is almost perfect.

    I wonder, could the display of the directory be displayed in the blog pages, rather than on its own blank page?

    Is it possible to make the listing handle directories? Presently, if directory listing is switched off, then an error occurs when trying to enter a directory, and if it is not, then the user clicks on a directory and is sent to the standard webpage directory listing, which is fugly.

    Anyone know how to get round these?

    There was recently another solution to this. It is called indexer.php. My memory fails me as to where I got it. However, if you do a search here, you should find the link. I use it on my site for a Downloads page. Check it out and see if that is what you need – https://www.jwurster.us/wordpress/.

    Thanks for the reply. Indexer.php is actually contained in the download above, and I have it working. However, issues are twofold (bearing in mind I am an all-but-complete newbie at this).

    1) If I create a page (rather than post), then that page is not displayed as part of the blog, but it its own page. I’d like the listing to be displayed like the blog posts.

    2) The listing is not recursive (is this the right word?). It’s fine for listing 100 files, but it doesn’t work when the directory in question has sub-directories.

    I want to use the webpage created to deliver company news and information, and this involves offering a large number of files, which need to be sorted by directory (there are 6 languages for each file, for example).

    Any ideas how I can get this working? I have my pages designed and ready to go. Displaying the files as they are organised in a directory as part of the blog pages is the last thing I need to do, having got the rest sorted very quickly and easily.

    I have my Downloads Page as a Page on my blog. Did you use the Page Template “indexer” as your template?

    I also wanted to display the files in sub-folders. I have started looking for a solution, but maybe a quick email to the indexer developer would help.

    I did indeed use that template. The link to the page is certainly part of the blog (under “Pages”), but when clicking on the page link, it clears everything in the browser window and just shows the directories. It does not appear “embedded” as part of the blog like a post does, and that’s really what I want.

    Who is the developer? Sounds like hbalagh just tweaked someone else’s code.

    Ideally I suppose I need a post that lists the selected directory by using some code, but that’s just so far beyone me. ??

    I have searched and found some php script that might help. If only I knew more about php and WP, I might be able to integrate the folder directory script I found with the indexer script. I’m chekcing with a friend to help.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Listing a Directory’ is closed to new replies.