Forums

All attachments view? (7 posts)

  1. ZiggyZack99
    Member
    Posted 3 years ago #

    Let's say my blog URL is http://podtube.co.cc/wordpress. What would the URL be where users could view EVERY uploaded attachment?
    http://podtube.co.cc/wordpress/media... no. What is it?

  2. ZiggyZack99
    Member
    Posted 3 years ago #

    I need help.

  3. accuweb
    Member
    Posted 3 years ago #

    ZiggyZack99,

    All Attachments/uploaded contents are always stored in the wp-contents/upload folder. But in that folder wordpress is creating folder with year and inside that another folder with month.

    If today I upload one screen capture then it will be stored on the server at below mentioned path:

    wp-content/uploads/2008/10/screencapture.jpg

    [spam link removed]

    Thanks,

  4. ZiggyZack99
    Member
    Posted 3 years ago #

    Thanks, accuweb, but what I was looking for was something that would look nice and be with my theme that displays all attachments and links to their respective pages.

  5. ZiggyZack99
    Member
    Posted 3 years ago #

    Help?

  6. Shane G
    Member
    Posted 3 years ago #

    I don't know if there is any command for this, but you can do it as following:

    To display all the uploads / attachments, you need to change path of your upload directory, change that path under your theme files and you shall be able to display all the attachments by a public URL.

  7. mkalis
    Member
    Posted 3 years ago #

    I think you can just take it from the database. It would look something like this. And take a look at the names used in the table - you can use all of those.

    global $wpdb;
    $attachments = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'posts WHERE post_type="attachment");
    foreach ($attachments as $attachment) {
       echo $attachment->post_title;
       // etc your code goes here (display what you want)
    }

Topic Closed

This topic has been closed to new replies.

About this Topic