WordPress.org

Ready to get started?Download WordPress

Forums

BlackBox Debug Bar
[resolved] are the plugin notices correct? (5 posts)

  1. Ovidiu
    Member
    Posted 5 months ago #

    For example I get this notice:

    Notice Undefined variable: class on line 26 in file /var/www/clients/client2/web8/web/wp-content/themes/ninja/header.php

    Line 26:
    <body <?php body_class($class); ?>>

    According to the WP codex that is correct:
    http://codex.wordpress.org/Function_Reference/body_class#Usage

    What now?

    https://wordpress.org/plugins/blackbox-debug-bar/

  2. Nilambar Sharma
    Member
    Posted 5 months ago #

    Did you initialize $class variable before that body_class($class) function call?

  3. Ovidiu
    Member
    Posted 5 months ago #

    No I didn't. I'm not a coder and the codex didn't mention that.
    Woudl you mind explaining how I should do it? Maybe even update the Codex?

  4. Nilambar Sharma
    Member
    Posted 5 months ago #

    If you dont want any extra class then just remove $class. It should work.
    <body <?php body_class(); ?>>

  5. Ovidiu
    Member
    Posted 5 months ago #

    Awesome that worked just fine!

    Thanks!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags