• Renee

    (@sputnikki)


    Hello, everyone.

    I’ve been doing some customization on a site, primarily through CSS but also witha couple plug-ins. I had attempted to install the child theme configurator plug-in to create a child theme, but got a “critical error” message (but everything *seemed* ok after). I’d also went through a couple other plug-ins that I’d installed briefly and uninstalled.

    However, a day or two later, I noticed that any custom CSS I had applied to headers, using .page-id-#, wasn’t rendering. I then noticed that all the page-ids (and other standard WordPress styles) in the <body> tag had disappeared.(So, the things like “class=”home page-template-default page page-id-1762″ aren’t there anymore.) All the body tag says now is
    <body class=”customize-support page-has-loaded”>. Lastly, all the filter drop down menus are still there and appear active, but when you click on them, nothing happens.

    <body <?php body_class(); ?>> is still in the header.php file. I’m wondering if that “critical error”/Child Theme Configurator error could have done something? (Just a guess, I don’t know if it could be related.) I’m at a loss as to why all the usual classes and page-ids just disappeared. I’m assuming this is why the filter menus suddenly stopped working, as well.

    As this is a client site, I’m not comfortable posting URLs, though I can post code or share privately. I realize this isn’t a ton of information, but I’m hoping someone might have ideas and be able to point me in the right direction, or suggest anything else I should try looking at?

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

    (@joyously)

    The way that plugins and themes add body classes is with the body_class filter. All filters should return their value, and this particular filter should respect what is already added. But some people don’t code things correctly. It looks like the culprit is the code that has added the customize-support page-has-loaded class, since that is all that is there. The code probably just assigned that class straight, instead of adding to the array. If this is in your child theme, take a look at your filter for the body class. If not, remove the plugin that is adding that.

    For the scripts that aren’t working (I’m assuming the filter drop downs are powered by scripts), it could be some javascript that has an error, so none of the scripts work.
    You can isolate things using the Troubleshoot mode of the Health Check plugin, which disables things for your user only.

    Thread Starter Renee

    (@sputnikki)

    Thank you, Joy! This is in the main theme, since I wasn’t able to make a child theme. (So based on what you said, I’m wondering if it WAS the error with the Child Theme Configurator that did this. I added it, but when I tried to configure, I got the critical error.)

    I’m not the original developer and I don’t have ftp access (clients are still paying for the site). When I’ve tried creating a staging area (then the Child Theme Config plugin), I found that I can’t do any of these things since the plugins don’t have read/write access. Also based on what you said, it sounds like this could part of the issue?

    I’ll take a look at the health check plug-in. Thank you!

    Joy

    (@joyously)

    This is in the main theme, since I wasn’t able to make a child theme.

    What is “this”?

    I’m wondering if it WAS the error with the Child Theme Configurator that did this.

    Did what? I doubt the plugin was doing a body class, and if it was, I doubt it was doing it wrong. But, plugins could dequeue your styles. Or, if you added the styles in Additional CSS with the parent theme active, then switch to a child theme, the styles are not there for the child theme, since they are saved with the currently active theme.

    I can’t do any of these things since the plugins don’t have read/write access. Also based on what you said, it sounds like this could part of the issue?

    WordPress needs write access to install plugins and themes, but the added CSS and the body classes are all dynamic, so no file permissions are needed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘full body class missing, including page-id and broken filter drop-downs’ is closed to new replies.