Post images not displaying as attachments
Try query post instead of $attachments = get_posts($args); or do it like <?php $args = array( ‘posts_per_page’ => 5, ‘offset’=> 1, ‘category’ => 1 ); $myposts = get_posts( $args ); foreach ( $myposts as $post ) : setup_postdata( $post ); ?> <li> <a href=”https://wordpress.stackexchange.com/questions/113158/<?php the_permalink(); ?>”><?php the_title(); ?></a> </li> <?php endforeach; wp_reset_postdata();?> also check this … Read more