Created
January 12, 2015 13:39
-
-
Save iloveitaly/0306ac6f85926093f66b to your computer and use it in GitHub Desktop.
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( dirname( __FILE__ ) . '/wp/wp-load.php' ); | |
$posts = new WP_Query('post_type=post&posts_per_page=-1&post_status=publish'); | |
$posts = $posts->posts; | |
header('Content-type:text/plain'); | |
foreach($posts as $post) { | |
$permalink = get_permalink($post->ID); | |
echo "{$permalink}\n"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment