WordPress.org

Ready to get started?Download WordPress

Forums

Different between Parents and Child page menu (1 post)

  1. pl4y312
    Member
    Posted 4 years ago #

    Hi mates,

    Is there anyone know the different between parents and child page navigation menu (in script)?

    I want to styling the parents page menu only.
    When I styling the page menu (including the child menu), I edit script /wp-includes/classes.php at this point:

    $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . esc_attr(apply_filters('the_title', $page->post_title)) . '">' . $link_before . apply_filters('the_title', $page->post_title) . $link_after . '</a>';

    But it looks bad in child menu, because it's use drop down menu.
    So I wonder what is the param different between parents and child menu?
    I want to make like this:

    if(parents_param){
    $output .= $indent . '[my_addition_style]<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . esc_attr(apply_filters('the_title', $page->post_title)) . '">' . $link_before . apply_filters('the_title', $page->post_title) . $link_after . '</a>';}
    
    else{
    
    $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . esc_attr(apply_filters('the_title', $page->post_title)) . '">' . $link_before . apply_filters('the_title', $page->post_title) . $link_after . '</a>';
    }

    Thanks for reply =)

Topic Closed

This topic has been closed to new replies.

About this Topic