LSCare
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Nav Menu, Remove ContainerIt’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!
Forum: Fixing WordPress
In reply to: Nav Menu, Remove ContainerBecause 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.
Forum: Fixing WordPress
In reply to: Nav Menu, Remove ContainerI 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.
Forum: Fixing WordPress
In reply to: Nav Menu, Remove Containerregister_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?
Forum: Fixing WordPress
In reply to: Nav Menu, Remove Container@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.
Forum: Fixing WordPress
In reply to: Nav Menu, Remove ContainerI 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.
Forum: Fixing WordPress
In reply to: Nav Menu, Remove ContainerMy 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
Forum: Fixing WordPress
In reply to: Nav Menu, Remove ContainerI did and it made no difference I’m afraid.
Forum: Fixing WordPress
In reply to: Nav Menu, Remove ContainerHere 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.
Forum: Fixing WordPress
In reply to: Nav Menu, Remove ContainerForum: Fixing WordPress
In reply to: Nav Menu, Remove ContainerI 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