Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter LSCare

    (@lscare)

    It’s alright… I am losing my mind over this so I’m going to come back to it another day I also just locked myself out with a fatal error which will not allow me into wp-admin and I don’t have access to an FTP server so can’t correct the mistake manually.

    Cheers for the help. I’m sure I will use one of your solutions!

    Thread Starter LSCare

    (@lscare)

    Because a duplicate menu would still need updating everytime you wish to add a page.

    That’s not something I would want to ask a third party to do.

    If I were making the site for myself then I would but I’d much rather not for someone else.

    Thread Starter LSCare

    (@lscare)

    I am using the default menu but i believe the default menu is called Primary Menu so when registering a menu if i register Primary Menu i am registering the default page menu.

    @esmi This translation thing may be getting somewhere… If you do not know this then I will read a bit deeper. but to make that textdomain, is that done via any other function or is it just taken from the name of the theme.

    Thread Starter LSCare

    (@lscare)

    register_nav_menus( array(
    ‘primary’ => __( ‘Primary Menu’, ‘collage’ ),
    ) );

    So then I assume collage is the name of the themes folder or the name of the theme?

    If it is… do you have any other functions setting up that menu in the functions.php file?

    Thread Starter LSCare

    (@lscare)

    @esmi Which theme are you doing that in and could you show me the registering function from the functions.php file please.

    and makin by the way is the name of the folder and theme, the menu is named using primary.

    Thread Starter LSCare

    (@lscare)

    I can’t do that though because if I want to use the same function with different criteria later then I wouldn’t be able to.

    I must be either missing something or doing something wrong but I need to be able to manipulate the container via the function arguments.

    All of that is ignoring my want to not manipulate the API functions for the obvious reason that one change can be quite destructive if a mistake is made.

    Thread Starter LSCare

    (@lscare)

    My functions.php doc has very literally only got:

    <?
    
    register_nav_menus( array(
    	'primary' => __( 'Primary Menu', 'makin' ),
    ) );
    
    ?>

    in it. There is no other code.

    edit: just off to lunch so will pick up when i return… thanks for the help so far

    Thread Starter LSCare

    (@lscare)

    I did and it made no difference I’m afraid.

    Thread Starter LSCare

    (@lscare)

    Here is all of the relevant code:

    <nav>
    <?
        wp_nav_menu(
            array( 'theme_location' => 'primary', 'container' => false )
        );
    ?>
    </nav>

    in header.php

    register_nav_menus( array(
    	'primary' => __( 'Primary Menu', 'makin' ),
    ) );

    in functions.php

    Based on what the function reference says… That is all I beleive I need but it still refuses to work.

    NB. I am aware I use shorthand <? but I have confirmed it is active on the server so it is not the lack of <?php at the beginning of the php code.

    Thread Starter LSCare

    (@lscare)

    @esmi: I have looked and am sure that the two bits of code in my original post satisfy the requirements on that page.

    @chreo: the menu items are listed by the li which is surrounded by the ul. That is all surrounded by the div.

    Thread Starter LSCare

    (@lscare)

    I wish it were that simple.

    My problem is that the wp_nav_menu() outputs the following:

    <div class='menu'>
    <ul>
    <li>xxx</li>
    <li>xxx</li>
    <li>xxx</li>
    </ul>
    </div>

    so you need to use the function’s arguments ‘container’ => ” to remove that output.

    Unfortunately I cannot get the function to not overlook the argument above. Even though so far as I can tell I have done all that is required by: the function reference (section quoted below)

    In order to remove navigation container, theme location specified in functions.php and used among arguments in function wp_nav_menu ( eg. ‘theme_location’ => ‘primary-menu’ ) must have a menu assigned to it in administration! Othervise argument ‘container’ => ‘false’ is ignored.

    Laurence S Care

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