How do I allow http/ftp access to files I have uploaded?

You might check out a plugin like this one. If you don’t want to go that route, I’d suggest using a page template and a technique like this to list out the files. Lastly, assuming you’re using apache, you could set apache to allow listing directory contents (not the best idea, IMO) and then edit … Read more

custom url – add attachment’s id or name after post

Showing links to attachments in the desired format Loop through the attachments and generate the link you want: $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => null, ‘post_status’ => null, ‘post_parent’ => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ($attachments as $attachment) { echo ‘<a href=”‘ . get_permalink() . ‘video/’ . $attachment->ID . … Read more

How can I prepopulate the URL address for the add media button

You can apply a filter to the output of the media insert url form using the filter named wp_media_insert_url_form: add_filter(‘wp_media_insert_url_form’, ‘ex46632_media_insert_url_form’); function ex46632_media_insert_url_form($html) { $html = str_replace(‘<input id=”src” name=”src” value=””‘, ‘<input id=”src” name=”src” value=”http://mysite.com/images/”‘, $html); return $html; } Something like this could be added to your theme’s functions.php file. This is untested code that is … Read more

Image not showing up in media loader success area – followup

untested, but it should work theoretically: add_filter(‘get_attached_file’, function($path, $file, $attachment_id){ // get the post object of the current attachment $att = get_post($attachment_id); // prepend attachment post parent ID to the file name return substr_replace($path, “{$att->post_parent}/{$file}”, -strlen($file)); }); Another filter, attempts to “fix” the path returned by WP’s upload handler: add_filter(‘wp_handle_upload’, function($results){ global $post; if(empty($post)) return … Read more