How can i get all post from my custom post type with each month ?
Here is how i'm doing it now, but it's only showing all titles.
<?php $news = new WP_Query( array( 'post_type' => 'notice', 'posts_per_page' => 999, 'order' => 'ASC' ) ); ?>
<?php while ( $news->have_posts() ) : $news->the_post(); ?>
<div class="testi-archive-list">
<a href="<?php the_permalink()?>"/> <h1><?php the_title()?></h1></a>
<p><?php the_field('sub_title_noticias')?></p>
</div>
<?php endwhile ?>
What i want is something like this:
January: Title 1 Title 2
February: Title 1 Title 2
And so on. Can anyone help ?