0

I've displayed all of my custom taxonomy terms and links with get_terms(). When I click on those links then they redirect me to archive.php. But in archive.php, it can't found any posts from those terms without WP_Query(). But my archive.php is ok for displaying posts from category or others. I can't understand what is the problem. It seems all things are right. Can anyone please give me a solution to solve this?

  • Have you flushed permalinks? – Nathan Powell Nov 9 '16 at 16:01
  • Yes. But yet can't found any posts. – Mobashir Nov 9 '16 at 16:06
0

Actually it was happened for using public => false, when registering my post type. So, always use public => true, has_archieve => true & with_front => true if you want to display your single custom posts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.