Title: When adding menu-primary.php to a child theme, inc/topbar-walker.php
Last modified: August 21, 2016

---

# When adding menu-primary.php to a child theme, inc/topbar-walker.php

 *  [slamorte](https://wordpress.org/support/users/slamorte/)
 * (@slamorte)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/when-adding-menu-primaryphp-to-a-child-theme-inctopbar-walkerphp/)
 * Steps to repeat:
 * Create a child theme named spine-child. Correctly configure the style.css and
   activate the theme. Add a menu to Primary Menu. All good so far; main menu navigation
   works great. But I need to edit the classes in the nav, so…
 * Now copy menu-primary.php to the child theme. Site won’t load. Error:
 * > Warning: include_once(inc/topbar-walker.php) [function.include-once]: failed
   > to open stream: No such file or directory in /home/members/lamorte/sites/dkdev1.
   > campaignupgrade.org/web/wp-content/themes/spine-child/menu-primary.php on line
   > 2
   > Warning: include_once() [function.include]: Failed opening ‘inc/topbar-walker.
   > php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /home/
   > members/lamorte/sites/dkdev1.campaignupgrade.org/web/wp-content/themes/spine-
   > child/menu-primary.php on line 2

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

 *  Theme Author [Paul de Wouters](https://wordpress.org/support/users/pauldewouters/)
 * (@pauldewouters)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/when-adding-menu-primaryphp-to-a-child-theme-inctopbar-walkerphp/#post-4279477)
 * thanks for reporting this!
    I’ll try and get a fix out over the weekend
 *  Thread Starter [slamorte](https://wordpress.org/support/users/slamorte/)
 * (@slamorte)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/when-adding-menu-primaryphp-to-a-child-theme-inctopbar-walkerphp/#post-4279478)
 * Thanks Paul! I supposed I could manually move ‘inc/topbar-walker.php’ into the
   subtheme, but I wanted to do it right so I’ve been holding off on this project.
 *  Theme Author [Paul de Wouters](https://wordpress.org/support/users/pauldewouters/)
 * (@pauldewouters)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/when-adding-menu-primaryphp-to-a-child-theme-inctopbar-walkerphp/#post-4279481)
 * The easiest way is just to copy the inc folder to the child theme and delete 
   everything in it except `topbar-walker.php`

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

The topic ‘When adding menu-primary.php to a child theme, inc/topbar-walker.php’
is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/spine/2.0/screenshot.png)
 * Spine
 * [Support Threads](https://wordpress.org/support/theme/spine/)
 * [Active Topics](https://wordpress.org/support/theme/spine/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/spine/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/spine/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Paul de Wouters](https://wordpress.org/support/users/pauldewouters/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/when-adding-menu-primaryphp-to-a-child-theme-inctopbar-walkerphp/#post-4279481)
 * Status: not resolved