
This is a simple plugin to list files in a given directory using this shortcode: [MMFileList /].
Parameters:
Output:
For all html formats you can expect to see the following output wrapped in styleable containers:
At this point “comma” is the only available text output and it only outputs the url to the file in a comma delimited list (no links – just text).
If the folder you’ve entered isn’t found or there are no files with the extensions you’ve listed there will be some warning text output to let you know. This text is wrapped in a “mmm-warning” class in case you want to style it out (for more information on styling check out the FAQ)
Usage Examples:
Let’s say you’re using the default WordPress Media settings so we can expect your uploads folder to be in /wp-content/uploads/mm/yy/ with this in mind the shortcode “folder” attribute will look in a directory relative to this. With this base directory say we want to list “png” files in the folder “/wp-content/uploads/cats/” we would use the following shortcode:
[MMFileList folder=”/../../cats/” format=”table” types=”png” /]
If you have you disabled the setting to store uploads in the /mm/yy/ folder structure (you can do this within Settings -> Media) and wanted to display that same file you would use this shortcode:
[MMFileList folder=”/cats/” format=”table” types=”png” /]
This will result in a tabular list of all .png files in the /wp-content/uploads/cats/ folder.
Custom Formats
The “li” and “custom” formats allow you to define a template using the content portion of the shortcode. The difference between these two output formats is that “li” will still wrap all the output in a <ul> tag and each file will be wrapped in a <li> tag. Here is an example of how to create a custom template:
[MMFileList folder=”/cats/” format=”li”]<div class=”taco”><a href=”{url}”>{name} ({size})</a></div>[/MMFileList]
Variables that can be used with the custom templates are as follows:
Regex and List Filtering
Regex or Regular Expressions are a really powerful tool but can seem intimidating at first. If you’re uncomfortable or having trouble feel free to reach out on the forums. For testing / trying to build your own pattens I recommend using https://regex101.com/ – it’s my goto. As a general rule for this plugin the pattern needs to be written with slashes /likethis/ for it to work. With regex the general rule is to try to keep things simple.
Using the regexfilter parameter you can exclude or include only specified files.
Let’s say you have a list of cat pics you want to share but you have both dog and cat photos in the same folder. Luckily for you – they’re still labeled name-cat.jpg or name-dog.jpg. You can use the regexfilter feature to help with your predicament.
The following will EXCLUDE all files with the word doc in them.
[MMFileList folder=”/myanimalpics/” regexfilter=”/dog/” /]
Another feature is the regexfilterinclusive option. Say for some reason your cousin Larry added a bunch of dog and frog photos to the folder but didn’t follow your naming conventions (dangit Larry!) well – have no fear. As long as you have a patten that matches your cat photos you can use this regexfilterinclusive toggle to show only those files.
[MMFileList folder=”/myanimalpics/” regexfilter=”/cat/” regexfilterinclusive=”1″ /]
Note: that regexfilter is done before regexstrip and another filename changes (e.g. pretty name, file size/file name removal etc…) so if you’re having trouble this might be part of the issue. Base your pattern on the original filename and you should be good.
Using regexstrip allows you to remove text that matches a given pattern and regexreplace allows you to put in other text instead of just blank space. These are fairly advanced so I wouldn’t recommend using them unless you really know what you’re doing.
Starting from $0 per month.
Rating
Reviewers
19 reviews
Tags
Developed By
Adam Bissonnette
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Contact Form plugins for Wordpress
Maps plugins for Wordpress
Translation plugins for Wordpress
Chat plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Contact plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Forms plugins for Wordpress
Comments plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Comments plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Portfolio plugins for Wordpress
Video Player plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Inventory plugins for Wordpress
Testimonials plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Analytics plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Security plugins for Wordpress
Ads plugins for Wordpress
Music Player plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Membership plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Video Player plugins for Wordpress
Tabs plugins for Wordpress
Social Feeds plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Make it easy for supporters to contribute using PayPal or Stripe by adding a donation button that keeps giving fast, secure, and on site.

Create consent forms that collect signatures, save submissions, send notifications, and help you manage approvals efficiently.
Add interactive image hotspots to your site to turn static visuals into clickable guided experiences that improve engagement.
Showcase photos with an image gallery that displays pictures and captions in grids, improves design, and boosts visitor engagement.
Create interactive flash cards that present questions and answers in a clear, customizable format to support learning, training, and user engagement.
Use right click protection to prevent copying by disabling right click actions, protecting your content and reducing unauthorized reuse on your site.
Use skill flip cards to showcase your abilities in a clear, interactive format that strengthens your profile and improves your chances of getting hired.
Display social proof avatars that show user activity and ratings, build trust instantly, and help visitors feel confident about your credibility.
Show posts in an X feed that keeps updates visible, improves content discovery, and helps visitors stay engaged with your latest activity.
Use a Cookie Banner to inform visitors about cookies on your site and let them manage their consent in a clear, structured way.
Show products, apps, or designs inside a clean device mockup that improves visualization, builds credibility, and helps visitors make confident decisions.
Show verified customer feedback with Google Reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
