Accessing $post variable from template part
is your file name is ‘include-nav.php’ or it is placed inside ‘include’ folder ? if not then simply call it by passing name of nav.php <?php get_template_part( ‘nav’ ); ?> you don’t have to pass include keyword to call template. Hope this help 🙂