• Hello,

    I need a special linking and have no clue how to do it…

    This is the menu structure:

    • Menu1
    • Menu2
    • Menu2.1
    • Menu2.2
    • Menu3

    (x.1 are childs)

    The Problem is that i need a Link on Menu1 to Menu1, on Menu3 to Menu3 and so on. Should be no Problem BUT how can i get a link to Menu2 on Menu2.1? There is no Parent function ??

    Please Help me!

    Greetings

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter tnt22

    (@tnt22)

    Can nobody help me? I posted two month ago nearly the same question and got no answers ??

    Do you need examples or something else?

    Thread Starter tnt22

    (@tnt22)

    Third try:

    I have a primary menu and a secondary menu.

    The primary menu is always the same and the secondary menu differs on which link from the primary menu somebody is.

    To get this realized i use pages and childpages.

    The secondary menu should look like this:

    PrimaryMenu Point (Same Link as in the PrimaryMenu)
    (space)
    SecondaryMenu Point 1
    SecondaryMenu Point 2
    SecondaryMenu Point 3
    ….

    PLEASE ask some questions or help me i need some answers ??

    Thread Starter tnt22

    (@tnt22)

    <?php //parent variables
    	$parent = get_post($post->post_parent);
    	$parent_title = get_the_title($parent);
    	$grandparent = $parent->post_parent;
    	$grandparent_title = get_the_title($grandparent);?>
    
    	<?php // is the homepage the granparent?
    	if ($grandparent == is_page('0')) { ?>
    	<li><a href="/<?php echo get_permalink($grandparent); ?>">12 <?php echo $grandparent_title; ?></a></li>
    
    	<?php // is the homepage the parent?
    	} elseif ($post->post_parent == is_page('0')) {?>
       <li> <a href="<?php echo get_permalink($post->post_parent) ?>">1234 <?php echo $parent_title; ?></a></li>
    
        <?php // I must be a top level page!
    	} else { ?>
         <li> <a href="<?php echo get_permalink($post->post_parent) ?>">123554 <?php echo $parent_title; ?></a></li>
        <?php }?>
        <br />
    
    <?php if ( is_page() ) {
          if($post->post_parent)
          $children = wp_list_pages('sort_column=menu_order&title_li=&child_of='.$post->post_parent.'&echo=0');
    else
          $children = wp_list_pages('sort_column=menu_order&title_li=&child_of='.$post->ID.'&echo=0');
          if ($children) {
       ?>
    <ul>
            <?php echo $children; ?>
            </ul>
       <?php
    } // End If Post
           } // End if is page
       ?>

    Ok i tried this way BUT is there a shorter way?

    And when i am in the 3rd level the menu shows the 2nd level but it should stay the same as in 2nd level

    Is there some reason that you can’t use Custom Navigation Menus, rather than hard-coding your menus?

    Thread Starter tnt22

    (@tnt22)

    Yes i have to rebuild a Hardcoded Page with its Design…

    That still doesn’t explain why you can’t use Custom Navigation Menus, though.

    Thread Starter tnt22

    (@tnt22)

    That looks very nice but i’m only this small step ahead of getting this done ?? I’ts a nice thing for my next projects but i hope i can get this done in the old way ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Link Problems’ is closed to new replies.