Hi Esmi,
I’m not sure what you mean by the post_class() in div. I’m generating the navigation by wp_list_pages function…
I just realized this also applies to the 404 page. I guess wordpress recognizes these as posts?
After some tinkering, I finally figured it out. For anyone who has the same issue, here’s the code to display the parent page:
$parentLink = get_permalink($post->post_parent);
$parentTitle = get_the_title($post->post_parent);
<a href="<?php echo $parentLink; ?>"><?php echo $parentTitle; ?></a>