Have you heard about the responsive map on any website? here you can see the short trick Recently, I have been working on  client’s website where I had to use a custom template with their blog page so I thought to share it with you a simple trick so that you can use it in your project, let’s talk about how to usethe_post_navigation() in a custom template, the answer is pretty easy to understand, let’s get started.

You may have seen the code below in WordPress in most recent template twentyseventeen/single.php

All you have to add 2 more args to get the post from the same category it works dynamically no matter either you have to use with blog or any other category or custom taxonomy

So the final code will look like as example below.

Make sure you add your own class name for div and href.

If you have any other question related to the_post_navigation() comments below and I will make sure your question will be answered quickly. You can also download my S3Framework for WordPress for free.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: