Created
August 23, 2013 00:31
-
-
Save msenateatplos/6314332 to your computer and use it in GitHub Desktop.
Script to display all post links for all blogs on a WordPress multi-site installation. Place in `wp-content/` then browse to http://yourblogdomain.com/wp-content/all-urls-all-sites.php or use as a script. Use `&post_type=article`, `&post_status=publish` and various other options with `query_posts()`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('../wp-blog-header.php'); | |
$blog_list = get_blog_list( 0, 'all' ); | |
foreach ($blog_list AS $blog) { | |
switch_to_blog($blog['blog_id']); | |
query_posts('&showposts=-1&order=ASC'); | |
while (have_posts()) : the_post(); ?> | |
<?php the_permalink(); ?> | |
<br /> | |
<?php endwhile; ?> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment