How to export a list of all media urls? [closed]
You can get what you want via: function get_the_file_urls( ) { $query_media_urls = array( ‘post_type’ => ‘attachment’, ‘post_status’ => ‘inherit’, ‘posts_per_page’ => – 1, ); $query_urls = new WP_Query( $query_media_urls ); foreach ( $query_urls->posts as $url ) { echo ‘<ul>’ . ‘<li>’ . wp_get_attachment_url( $url->ID ) . ‘</li>’ . ‘</ul>’; } } This could either … Read more