WordPress.org

Support

Support » Plugins and Hacks » Hacks » Sidebar no longer is recognized by my PHP

Sidebar no longer is recognized by my PHP

  • Hello Everyone, I was working on my wordpress site trying to get it compatible on firefox (Still a working progress, but works on chrome). and suddenly my site sidebar are no longer recognized by .php coding. Does anyone have ideas to why this is happening. It worked before.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Kevin Marsden

    @solesurfer

    Contributor Day Volunteer

    You might have excess whitespace in your php file. Can you post the sidebar file to pastebin.com and send us a link?

    Here is the header.php

    http://pastebin.com/x0Ypu1xL

    and here is the php for the pages.

    http://pastebin.com/4hjFVev2

    Moderator bcworkz

    @bcworkz

    Unless your theme or plugins have such a function, I believe is_sidebar_active(14) should be is_active_sidebar(14).

    If you have WP_DEBUG set to true, you should have gotten an error message about no function defined, unless of course your theme or plugins have such a function.

    I tried changing the function and it didn’t make a difference.

    Moderator bcworkz

    @bcworkz

    🙁 So much for easy fixes. You may need to resort to some basic debugging to identify exactly where things go wrong. Start by placing some HTML content above the call to dynamic_sidebar() to check if it is even being called. If that checks out, temporarily insert a var_dump() line here and there in the dynamic_sidebar() source code to test various variables contain the expected values and that code is executing up to that point. The source code is in wp-includes/widgets.php around line 840. Be sure to keep a clean original copy of the file so it’s easily restored when you’re done testing.

    I found the solution. I changed the code line to

    <?php if ( function_exists('dynamic_sidebar')){ dynamic_sidebar('Blog Listing Sidebar'); }
    ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sidebar no longer is recognized by my PHP’ is closed to new replies.
Skip to toolbar