WordPress.org

Ready to get started?Download WordPress

Forums

WordPress 3.0 wp_get_nav_menu_item() links missing (5 posts)

  1. andy_owen
    Member
    Posted 4 years ago #

    This is my first post here... I figured it was about time I get involved with the development where I can.

    I'm experimenting with the wp_nav_menu function and I've managed to enable my theme, create a menu and bring this into my theme using both a widget and manually with wp_nav_menu().

    Both resulted in the expected output but without the relevant href... this was just empty.

    I've manually got this working by changing line 164 in nav-menu-template.php as follows:

    ORIGINAL
    $href = isset($menu_item->link) ? ' href="'. esc_url($menu_item->link) .'"' : '';

    MOD
    $href = isset($menu_item->guid) ? ' href="'. esc_url($menu_item->guid) .'"' : '';

    Am I being thick or is this a genuine mistake?

    Apoligies if it's the former :)

  2. andy_owen
    Member
    Posted 4 years ago #

    No takers then?

    or am i in the wrong place?

  3. danieleckhart
    Member
    Posted 4 years ago #

    I'm seeing the same issue. There are a couple of related issues on trac. Tickets #12566 and #12571.

  4. andy_owen
    Member
    Posted 4 years ago #

    Well at least it's not me being thick... I'll keep an eye on that trac issue.

    Thanks Daniel

  5. Andy Warburton
    Member
    Posted 4 years ago #

    Yup - seeing the same here. Very frustrating.

Topic Closed

This topic has been closed to new replies.

About this Topic