• Resolved tazboy

    (@tazboy)


    I’ve done the steps on Automattic’s site on how to widget a theme. I’m using the “blue-curves-15” theme by Priss. I’ve created the functions.php and sidebar.php. I have the “Sidebar Widget” tab, only the site doesn’t show the new widget sidebar. It shows the old one. Though when I do “view source code” through FF’s web developer it shows my Event Calendar from my sidebar widget. Go figure.

    Any suggestions? I’ve tried copying other functions.php and sidebar.php from themes that work. No go there. I’ve tried multiple suggestions on this site too. Just so you know that I didn’t come here begging for help right away. I would appreciate anything. Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’ve created the functions.php and sidebar.php. I have the “Sidebar Widget” tab, only the site doesn’t show the new widget sidebar. It shows the old one.

    did you put the widget code into your sidebar.php file?

    Thread Starter tazboy

    (@tazboy)

    I have this code in my sidebar.php file:

    <div id=”sidebar”>
    <?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>
    <div class=”title”>About</div>
    <p>This is my blog.</p>
    <div class=”title”>Links</div>

    <?php endif; ?>
    </div>

    I have this code in my functions.php:

    <?php
    if ( function_exists(‘register_sidebar’) )
    register_sidebar();
    ?>

    <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar() ) : ?>

    This looks off to me. It’s saying “if the function of dynamic sidebar doesn’t exist, then don’t show the dynamic sidebar” – which is correct, really. However, it’s not telling your site what to do if the function *does* exist.

    <div id="sidebar">
    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
    place in the code for all the stuff that should show up if your widget sidebar *didn't* exist
    <?php endif; ?>

    Give that a shot and see if it helps.

    Thread Starter tazboy

    (@tazboy)

    That didn’t work either. There does need to be a </div> on the end of that, right? Is there another function or code somewhere that I’m missing? I was told this should be fairly simple, relatively that is. Any other suggestions? By the way, thanks for the help so far.

    Yeah, there should.

    Have you tried downloading a fresh copy? it could be that the one you have is corrupted. It truly is easy to set widgets up – and it sounds like you’ve done everything you’re supposed to do. The only other thing I could think of is that maybe you got a corrupted download by accident.

    Thread Starter tazboy

    (@tazboy)

    I emailed Otto from here and he got back to me. He informed me that I didn’t need a sidebar.php because the sidebar info was in the header.php. So I needed to change the header.php. Here is what he had me change: (the functions.php was already ok)

    Next, I see that there’s no sidebar.php file. Looking around, I find
    the sidebar actually in header.php for some odd reason. Weird, but it
    doesn’t matter. We’ll just edit the sidebar there. You’ll open
    header.php and do the following:

    Change this code:
    <!– S T A R T N A V B A R –>
    <div id=”right”>
    <div id=”righttop”></div>
    <div id=”rightcontent”>

      <!– START SEARCH –>

      Into this:

      <!– S T A R T N A V B A R –>
      <div id=”right”>
      <div id=”righttop”></div>
      <div id=”rightcontent”>

      <?php if ( !function_exists(‘dynamic_sidebar’)
      || !dynamic_sidebar() ) : ?>
      <!– START SEARCH –>

      Then find this code:
      <!– END META –>

    And change it to this:
    <!– END META –>
    <?php endif; ?>

    good – glad you got it sorted!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Widgetizing Theme Help’ is closed to new replies.