• Hello there!

    I am trying to build a new website with the Theme “Coeur”.
    The urls of the parent pages (On the navigation menu) only include a # but no available link to the page I mentioned in the menu settings.
    Everything works fine with the sub-pages, or with first level pages as long as they do not have any sub-page.
    Does anyone know where to look in order to fix this? (the theme is based on bootstrap). I could not find it till now.
    Thanks a lot!

Viewing 1 replies (of 1 total)
  • Thread Starter Hazloo

    (@hazloo)

    Just found the place but I don’t know what to change in the following code to fix my issue;
    Could someone help?
    Thx!

    * Dividers, Headers or Disabled
    * =============================
    * Determine whether the item is a Divider, Header, Disabled or regular
    * menu item. To prevent errors we use the strcasecmp() function to so a
    * comparison that is not case sensitive. The strcasecmp() function returns
    * a 0 if the strings are equal.
    */
    if ( strcasecmp( $item->attr_title, ‘divider’ ) == 0 && $depth === 1 ) {
    $output .= $indent . ‘<li role=”presentation” class=”divider”>’;
    } else if ( strcasecmp( $item->title, ‘divider’) == 0 && $depth === 1 ) {
    $output .= $indent . ‘<li role=”presentation” class=”divider”>’;
    } else if ( strcasecmp( $item->attr_title, ‘dropdown-header’) == 0 && $depth === 1 ) {
    $output .= $indent . ‘<li role=”presentation” class=”dropdown-header”>’ . esc_attr( $item->title );
    } else if ( strcasecmp($item->attr_title, ‘disabled’ ) == 0 ) {
    $output .= $indent . ‘<li role=”presentation” class=”disabled”>‘ . esc_attr( $item->title ) . ‘‘;
    } else {

    $class_names = $value = ”;

    $classes = empty( $item->classes ) ? array() : (array) $item->classes;
    $classes[] = ‘menu-item-‘ . $item->ID;

    $class_names = join( ‘ ‘, apply_filters( ‘nav_menu_css_class’, array_filter( $classes ), $item, $args ) );

    if ( $args->has_children )
    $class_names .= ‘ dropdown’;

    if ( in_array( ‘current-menu-item’, $classes ) )
    $class_names .= ‘ active’;

    $class_names = $class_names ? ‘ class=”‘ . esc_attr( $class_names ) . ‘”‘ : ”;

    $id = apply_filters( ‘nav_menu_item_id’, ‘menu-item-‘. $item->ID, $item, $args );
    $id = $id ? ‘ id=”‘ . esc_attr( $id ) . ‘”‘ : ”;

    $output .= $indent . ‘<li’ . $id . $value . $class_names .’>’;

    $atts = array();
    $atts[‘title’] = ! empty( $item->title ) ? $item->title : ”;
    $atts[‘target’] = ! empty( $item->target ) ? $item->target : ”;
    $atts[‘rel’] = ! empty( $item->xfn ) ? $item->xfn : ”;

    // If item has_children add atts to a.
    if ( $args->has_children && $depth === 0 ) {
    $atts[‘href’] = ‘#’;
    $atts[‘data-toggle’] = ‘dropdown’;
    $atts[‘class’] = ‘dropdown-toggle’;
    $atts[‘aria-haspopup’] = ‘true’;
    } else {
    $atts[‘href’] = ! empty( $item->url ) ? $item->url : ”;
    }

    $atts = apply_filters( ‘nav_menu_link_attributes’, $atts, $item, $args );

    $attributes = ”;
    foreach ( $atts as $attr => $value ) {
    if ( ! empty( $value ) ) {
    $value = ( ‘href’ === $attr ) ? esc_url( $value ) : esc_attr( $value );
    $attributes .= ‘ ‘ . $attr . ‘=”‘ . $value . ‘”‘;
    }
    }

    $item_output = $args->before;

    /*

Viewing 1 replies (of 1 total)
  • The topic ‘[Theme Coeur] Navigation Menu Issues’ is closed to new replies.