Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter vuvex

    (@vuvex)

    Cheers!

    Thread Starter vuvex

    (@vuvex)

    I bow to you! Thanks for your help, mate.

    I followed your lead, and finally go to the comment right before the wp_nav_menu line, a pretty important comment:

    <?php /* Our navigation menu. If one isn’t filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>

    I ignored this line before since it was inside another php code section, I thought it had nothing to do witn the nav_menu. That was wrong.

    Anyways, I created a custom menu and everything is fine now.

    It’s always good to have a fresh look at things.

    Thanks!

    Thread Starter vuvex

    (@vuvex)

    Hmmm… let me check that. I also enabled the original twenty_ten with the proper wp_nav_menu changes, and still nothing. Let me dig a bit deeper.

    Thread Starter vuvex

    (@vuvex)

    I am using version 3.1. Are you using something newer?

    Thread Starter vuvex

    (@vuvex)

    That’s perfect! Thank you! At least I know it works for somebody.

    I can’t get it to do anything. I should probably revert to the default theme and also try it there.

    Thread Starter vuvex

    (@vuvex)

    Actually yes, that’s how it is, it’s just not doing anything. I can add whatever I want, it’s just not showing, it’s like the function is not called, or the ‘before’ and ‘after’ arguments are not appended to the final result.

    The only thing I got working was a function from a website:

    // Add ID and CLASS attributes to the first <ul> occurence in wp_page_menu
    function add_menuclass($ulclass) {
    return preg_replace('/<ul>/', '<ul id="nav" class="something-classy">', $ulclass, 1);
    }
    add_filter('wp_page_menu','add_menuclass');

    …that I added into the functions.php file. It works on ul, but not li.
    I tried to replace the ul with li, but there must be something that I am not doing right.

Viewing 6 replies - 1 through 6 (of 6 total)