Function to list all post slugs for every post in wp_posts table?
I assume there's an official function to generate a post slug, but maybe someone here already has the answer.
Function to list all post slugs for every post in wp_posts table?
I assume there's an official function to generate a post slug, but maybe someone here already has the answer.
Share Improve this question asked Jul 14, 2011 at 20:35 Jay BrunetJay Brunet 5702 gold badges8 silver badges15 bronze badges1 Answer
Reset to default 4example - unordered list with post slugs:
<ul>
<?php foreach( get_posts('numberposts=-1') as $post ) {
echo '<li>' . $post->post_name . '</li>';
} ?>
</ul>
http://codex.wordpress/Template_Tags/get_posts