Thread Starter
taiga
(@taiga)
I found the solution from elsewhere on the Forums. I’ll probably look into the Gallery short code later. Here’s the solution – with simple html markup added (list for an example):
<ul>
<?php
$args = array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'post_parent' => null, // any parent
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $post) {
echo '<li>';
setup_postdata($post);
the_attachment_link($post->ID, false);
the_excerpt();
echo '</li>';
}
}
?>
</ul>
Thread Starter
taiga
(@taiga)
Any insights?
WP tries to reach comments and permalinks by inserting its own code after the WP address, that has been set in the dashboard. I would need it to direct the queries inside the PHP where the Loop is placed.