Showing Specific page or View all posts is not working in wordpress

I am trying to show view all post with this link

<a class="btn-primary" 
href="<?php echo get_permalink( get_option( 'page_for_posts' ) );?>">View All</a>

It directing the correct page id, but with that page it showing home page, not working that page. N.B. i have set from setting>Reading Setting> posts page Blog page which is current page which is not working. any solution.

Read more here: Showing Specific page or View all posts is not working in wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *