I want to make a simple calendar in my wordpress. I want to show every day different posts, which have the current date as tag.
For example, I put a tag 17-01-2017 in three posts. I want to get them as a list on 17-01-2017.
I have the following code, which works fine -
<?php $wpb_all_query = new WP_Query( 'tag=something' ); ?> <?php if ( $wpb_all_query->have_posts() ) : ?> <ul> <!-- the loop --> <?php while ( $wpb_all_query->have_posts() ) : $wpb_all_query->the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> <!-- end of the loop --> </ul> <?php wp_reset_postdata(); ?> <?php else : ?> <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p> <?php endif; ?>
However, I can't change the preset value "something" to show current date like 17-01-2017. Can you please, help me?