I have two custom post type name as ‘product’ and ‘blog’. And I have also two archive page ‘archive-product.php’ and ‘archive-blog.php’.

Now i want to know which archive page is active.

example we know is_page(‘contact’) if page is contact then it return true. but what about archive page. i used is_archive(‘blog’). but this function return always true on both product archive or blog archive active.

So is there any way to know is this archive page ‘product’ or ‘blog’ is active

Read more here: how to know which Archive Pages user now active


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , ,

Wordpress related questions and answers: