Hey, thanks for your answer. Sadly this tutorial doesn’t help. And it actually doesn’t suit my problem since my permalinks all work, the problem is with items disappearing when I go into single page item from catalog.
My permalink structure is Default. (example – ?p=123)
I believe it has something to do with link structure.
Maybe it has to do with how many is written in functions.php ? I noticed this is also a problem on standart WordPress layout too. The only difference is that there you see sub-menu on hover (not always when you go into it). So you can notice that when you go into product the sub-menu link becomes not “marked” (active).
And the sub-menu navigation is registered in functions.php . Maybe this should be modified somehow?
function sm_subnav()
{
global $post, $wpdb;
if ( is_page() )
{
$child_of = null;
if ( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='page' && post_parent = ".$post->ID) > 0 ){
$child_of = $post->ID;
}
else if ( $post->post_parent != 0 ){
$child_of = $post->post_parent;
}
if ( !is_null($child_of) )
{
echo '<div class="navigation" id="sub-nav-1">' . "\n";
echo '<ul class="katalogas">' . "\n";
wp_list_pages('title_li=&child_of='.$child_of);
echo '</ul>' . "\n";
echo '<div class="clearer">?</div>' . "\n";
echo '</div>' . "\n";
}
}
}