Created
September 30, 2016 21:36
-
-
Save gareth-gillman/413ac74bf19e04cfd56f56e54a7ad28f 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
<ul> | |
<?php | |
$query_args = new WP_Query( | |
array( | |
'post_type' => 'attachment', | |
'posts_per_page' => -1, | |
) | |
); | |
if ( $query_args->have_posts() ) { | |
while ( $query_args->have_posts() ) : $query_args->the_post(); | |
$query_args->the_post(); | |
echo '<li>' . get_the_title() . '</li>'; | |
endhwile; | |
} | |
?> | |
</uk> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment