<?php if(!oriont_get_option( 'subpages_nav' )): ?><?php if (is_page()) : ?>
       <?php
    global $wp_query;
    if( empty($wp_query->post->post_parent) )
    {
    $parent = $wp_query->post->ID;
    }
    else
    {
    $parent = $wp_query->post->post_parent;
    } ?>
     
    <?php if(wp_list_pages("title_li=&child_of=$parent&echo=0" )): ?>
    <div class="sub-navigation">
<div class="container"><div class="main-estrutura main-estrutura2">
    <div id="submenu">
    <ul>
    <?php wp_list_pages("title_li=&child_of=$parent" ); ?>
    </ul>
    </div>
    <div class="clear"></div>
</div></div>
</div>
    <?php endif; ?>

<!-- .PAGES-sub-navigation /--> <?php endif; ?><?php endif; ?>