I have a WordPress website and have some posts. I have some special post under category "Blessing". I want to display all post from blessing category which were posted on current week though a anchor tag. I want place one photo on homepage When user will click on that it will only show the posts from Blessing category of current week. year can be any... means it year is not necessary, I want only post of the current week.. please help.. coding will be helpful... I am new to WordPress... Please help.
I have type some code... please help.. It is showing the post of week.. but all not from my category
<?php
$week = date('W');
$args = array(
'w' => $week,
'post_type' => 'post',
'post_status' => 'publish',
'cat' => 'blessing',
'date_query' => array('week' => $current_week),
'posts_per_page' => -1,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
<?php
endwhile;
wp_reset_query(); // Restore global post data stomped by the_post().
?>