Group Admins

WordPress Troubleshooting and Support

Public Group active 10 months ago ago

WordPress support from our community

Broke site trying to add additional menu

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1592
    Vincent Gentile
    Participant

    I am trying to add an additional menu to the header of my site and tried to use the 404 menu in the theme with a custom menu to add the second menu to the header.

    I added a header.php file to the avada child and added the this code to the header.php: ’404_pages’, ‘container_class’ => ‘nav’ ) ); ?>

    It didn’t work and even though I have removed the code from the header.php the site hasn’t gone back to what it should be.

    Staging site: http://privacy.avmhost.com/

    Any ideas………..…?

    #2792
    Vincent Gentile
    Participant

    For some reason all of the code is not showing up in the post….this is what I added:
    ’404_pages’, ‘container_class’ => ‘nav’ ) ); ?>

    #2793
    Steve
    Keymaster

    By adding a header.php file I’m assuming you’re using a child theme and over riding the main Header.php.

    Did you copy the parent header.php and add your code?

    #2794
    Vincent Gentile
    Participant

    Hi Steve…..yes using a child and no…..i did not copy the the parent header.php code…I assumed the child code would pick up.

    #2795
    Vincent Gentile
    Participant

    I assumed the child would pick up the parent.

    #2796
    amylaneio
    Spectator

    @Vincent, any file you want to add code to in the child, you need to copy the entire file, then edit it. The child header.php completely overrides the parent header.php. (The only “exception” for this is style.css, but that’s because the first thing you do in in the child style.css is @import the parent style.css).

    #2797
    Vincent Gentile
    Participant

    Thank You Steve/Andy – So I loaded the header.php into the child and the site came back ….then I was going to register a new menu …..so I loaded the functions.php into the child and I am getting the following errors…?

    Warning: require_once(admin/index.php) [function.require-once]: failed to open stream: No such file or directory in /home/avmhost/public_html/privacy/wp-content/themes/Avada-Child-Theme/functions.php on line 19

    Fatal error: require_once() [function.require]: Failed opening required ‘admin/index.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/avmhost/public_html/privacy/wp-content/themes/Avada-Child-Theme/functions.php on line 19

    #2798
    amylaneio
    Spectator

    Shoot, forgot that functions.php also doesn’t override the parent. You can just add the new function to the child’s functions.php without having to duplicate the parent. See the following for more details:

    http://codex.wordpress.org/Child_Themes#Using_functions.php

    #2799
    Vincent Gentile
    Participant

    Andy – Thank You…..I added the extra menu……Do you how to keep the styling of this menu separate from the menu above it….? I need to move it around

    staging site – http://www.privacy.avmhost.com

    #2800
    amylaneio
    Spectator

    You’ll need to change, or even remove, the class of the

      tag to something else if you want completely different styling, i.e.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.