WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar no longer is recognized by my PHP (7 posts)

  1. mejle12
    Member
    Posted 8 months ago #

    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.

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

  3. mejle12
    Member
    Posted 8 months ago #

    Here is the header.php

    http://pastebin.com/x0Ypu1xL

    and here is the php for the pages.

    http://pastebin.com/4hjFVev2

  4. bcworkz
    Member
    Posted 8 months ago #

    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.

  5. mejle12
    Member
    Posted 8 months ago #

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

  6. bcworkz
    Member
    Posted 8 months ago #

    :( 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.

  7. mejle12
    Member
    Posted 8 months ago #

    I found the solution. I changed the code line to

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

Reply

You must log in to post.

About this Topic