I am new to WordPress, and need some help.
What I am trying to do is that I have created a WordPress account, and now I want to create a section in that blog which consists all my files which are uploaded on my computer on a specific folder. So whenever I change any file there, it changes over there automatically. Is this possible?
Also is there a way that I can give only read permission to my wordpress site to people with a username and password?
I am using Linux Ubuntu 12.04
Here we go, in form of a plugin 🙂
Notes
The media submenu is added with the function
add_media_page()
.The folder being read is
wp-content/custom/
, using WordPress constantsWP_CONTENT_*
. If you haven’t modified them, they point to the default content dir.Adjust the value of
$baseDir
and$baseUrl
.Maybe, instead of linking directly to the file, you’d want to force the download or open a media player.
Create a new PHP file, paste the code, put in your plugins folder, activate
Plugin
PS.
To give users read only capability, set their role to
Subscriber
.