• Resolved gandalf458

    (@gandalf458)


    I have a theme based on twenty-ten and the widget area of my admin panel tells me No Sidebars Defined. The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions. I’ve looked at the instructions and my sidebar.php includes:

    if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
    
      <li id="search" class="widget-container widget_search">
        <?php get_search_form(); ?>
      </li>

    which seems to suggest it is widget-aware.
    Any ideas what am I missing please?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Have you over-written the parent’s sidebar registration function in your child theme’s functions.php file.

    Thread Starter gandalf458

    (@gandalf458)

    No, I haven’t touched functions.php (thankfully).

    Is this a child theme?

    Thread Starter gandalf458

    (@gandalf458)

    As I understand it it’s a derivative theme. I have my own footer, header, index, loop-attachment, loop-page, loop-single, loop and sidebar php files which I created by modifying the originals.

    Then you need to check your sidebar names/ids against those in your theme’s functions.php file.

    Thread Starter gandalf458

    (@gandalf458)

    I only have primary-widget-area and secondary-widget-area. Mostly I have removed things as the theme is for a non-blog website. And, on looking at sidebar.php again I have what appears to be a widget search form. Puzzling.

    I suggest you start again. You seem to have removed/changed more than you should have.

    Thread Starter gandalf458

    (@gandalf458)

    Well, I have replaced the sidebar.php with the unmodified version and removed loop.php, loop-attachment.php, loop-page.php and loop-single.php but I still get the message in my admin area ‘No Sidebars Defined’. There doesn’t seem much else to replace. My index.php is unchanged from the original.

    No – you need to start the whole theme development again.

    Thread Starter gandalf458

    (@gandalf458)

    Esmi, thanks for your patience. I’m probably being daft. I have deleted everything in my theme folder and reverted to twentyten. Then I copied the twentyten index.php file and my CSS file – I can’t imagine the CSS is going to stop the widgets working – into my theme directory. In the Manage Themes section of my admin area I have activated my derivative theme and there is Options: widgets. But if I select widgets I still get No Sidebars Defined.

    You have to copy the whole theme – not just two files.

    Thread Starter gandalf458

    (@gandalf458)

    I understood that I could create a derivative theme with just a style.css and create other files as needed. Have I misunderstood the basics? If I copy all the files presumably it’s not a derivative theme is it?

    What you’re referring to is a child theme.

    Thread Starter gandalf458

    (@gandalf458)

    Ah, well it looks like I was misinformed. Thanks.

    Thread Starter gandalf458

    (@gandalf458)

    Well, having created a proper derivative template rather than the child template I apparently had I now have widgets!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Widgetising my theme’ is closed to new replies.