• I’m using ‘Suffusion 4.0.4’ to build a site for a friend (https://www.instituteofchairmans.com)

    Thank you all for detailing how to set up a child theme, that has been successful…ish.

    For reasons which I don’t understand, activating the child theme causes the nav bar under the header to disappear. I can’t think of any reason why this should happen.

    Another problem, which I solved easily enough, was that the main wrapper had a green outline and light green background when i switched to the child theme. Solved, with a patch of css in the child folder, but still no idea why something as apparently random as this should happen.

    The css for the child theme is as follows (short enough to put here I hope…)

    [CSS code moderatedthe limit for posting in the forum is 10 lines – however, a link to your site is enough to access the styles]

    sidebar shell and header container bits are fine. Commenting them out doesn’t magically bring the missing nav bar back though…

    Richard B

Viewing 6 replies - 1 through 6 (of 6 total)
  • Your nav bar doesn’t disappear – you have to re-add it from Appearance → Menus. That is how menus behave in WP with respect to child themes.

    For the green border, you shouldn’t be importing the stylesheet. You can get a starter child theme, where the style.css and functions.php have instructions on what you should and shouldn’t code into the files.

    Thread Starter moorea21

    (@moorea21)

    I didn’t import the style sheet… I wrote it from scratch, so I’m still unsure about the origin of the green-ness. I think it should function the same as the one you linked me to. (please correct me if I’m wrong on that)

    I didn’t know I’d have to re-add the menu, thanks for pointing that out.

    I don’t yet understand the contents of the .php file, I’ll try and work that out tomorrow.

    Thanks for the help so far

    R

    Simply put, you don’t need the @import directive in your stylesheet, because in most cases the theme takes care of it for you. If you download the starter pack, you will see the instructions in the file, which tell you when to include the @import directive and when not to.

    Thread Starter moorea21

    (@moorea21)

    okay, thanks, I may just leave it like it is, unless it causes more problems!

    More than problems, you are loading a fairly large stylesheet twice: once implicitly in Suffusion, once explicitly via your child theme and that too using an expensive @import directive. This will affect your site’s performance. Moreover, this will also cause random overwriting of your skin-specific CSS.

    So, by leaving it in, you are degrading both, performance and appearance.

    Thread Starter moorea21

    (@moorea21)

    Okay, I’ll try leaving the @import out, and follow your instructions on achieving the same end through the dashboard. I take your point about it loading twice, that makes sense now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘disappearing nav bar when using child theme’ is closed to new replies.