Support » Themes and Templates » 2015 child theme breaks wp-admin and reveal button

  • Resolved David Steuber

    (@david-steuber)


    Hi,

    I’ve been working on a Child Theme for the Twenty Fifteen theme. My motivation is to reduce use of white space. But I’ve had some odd difficulties that have me confused.

    1) I’ve managed to break the Admin Dashboard bar. It won’t show. I do have a work around to get to it, but this is rather annoying.

    2) The reveal button (or whatever it’s called) for small displays like iPad 2, iPhone, or just a rather narrow browser window doesn’t work anymore. Clicking it does nothing.

    I’ve also had glitches with the side navigation text taking a while to show up. There were also formatting glitches with the comments area that went away (or maybe they are there when not logged in).

    So far, I’ve only tested on Safari 8.0.3 on Yosemite, iPad 2, and iPhone 5s where the iOS devices are running iOS 8.2.

    My site is http://www.david-steuber.com.

    I’ve conveniently placed my child theme on GitHub (revision control is always a good idea).

    https://github.com/DavidSteuber/twentyfifteen-child

    Obviously I’m using bad practice to achieve the site formatting I want. Any ideas on what I’m doing wrong? All the relevant changes are in my style.css.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Because you don’t call wp_footer() in your child theme’s footer.php, the HTML/CSS/JS for the admin bar doesn’t get loaded, and neither does the JS that controls the menu toggles. You should add it on line 18 of your child theme’s footer.php, right before the </body> tag.

    I’ve also had glitches with the side navigation text taking a while to show up. There were also formatting glitches with the comments area that went away (or maybe they are there when not logged in).

    I can’t reproduce either of these issues, unfortunately. Have you been able to narrow it down to specific posts or does it occur at random?

    Adding the wp_footer() call back worked for getting the admin bar back.

    I’m still getting some drawing glitches. The content wants to jump to the left. It’s tricky to describe.

    I would never have thought of the wp_footer() thing. I just wanted to remove the colophon thing. Thanks.

    I just made this change.

    I’m wondering if I need a “float: right” property on the main content class or something.

    I haven’t been able to reliably reproduce things.

    I added this to my CSS:

    /**
     * 9.0 Clearings
     */
    
    .site-content {
            float: right;
    }

    This seems to fix drawing glitches. Hopefully that is the right way to tackle it.

    Changes have been committed to GitHub.

    I think things are working.

    How did you get the menu button to work? Once my site (twenty fifteen with child theme) is down to iPad sized screens the nav menu button stops working.

    jjweb-design.com

    The JavaScript that makes it work is contained in the wp_footer() function which needs to be called from footer.php.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘2015 child theme breaks wp-admin and reveal button’ is closed to new replies.