• I am using a modified version of Cold Blue that I call New Day. It was not widgetized when I activated it.

    I tried <?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>

    <?php endif; ?>

    I tried swapping in other sidebar.php files from other pre-widgetized themes. Nothing seems to work, WordPress doesn’t detect widget capability.

    Is there something else I’m missing, maybe in index.php? Or do I have to start over and pick another theme? 🙁

Viewing 15 replies - 1 through 15 (of 17 total)
  • who is hosting your blog? wordpress or an extrenal hosting company?

    You do have a functions.php right?

    Thread Starter michaelul

    (@michaelul)

    I am using WordPress on Bluehost (which of course has PHP support).

    I have a functions.php file under my /wp-includes directory. At the very end, I see this:

    function wp_maybe_load_widgets() {
    if ( !function_exists( ‘dynamic_sidebar’ ) ) {
    require_once ABSPATH . WPINC . ‘/widgets.php’;
    add_action( ‘_admin_menu’, ‘wp_widgets_add_menu’ );
    }
    }

    function wp_widgets_add_menu() {
    global $submenu;
    $submenu[‘themes.php’][7] = array( __( ‘Widgets’ ), ‘edit_themes’, ‘widgets.php’ );
    ksort($submenu[‘themes.php’], SORT_NUMERIC);
    }

    Perhaps something here is not right? Forgive me, I am new to PHP! Thanks a bunch for taking the time to help me.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    He’s talking about a functions.php in your theme’s directory, not the WordPress functions.php file.

    If your theme doesn’t have a functions.php file, then it’s not widget capable. Period. You need both a widgetized sidebar *and* a functions.php which tells WordPress about the widgetized sidebar(s).

    To widgetize a theme, look here for more info:
    http://automattic.com/code/widgets/themes

    From your post, it sounds like you’ve done half the work, but still have not registered the sidebar in the theme’s functions.php file.

    Otto is correct. I meant a functions.php inside your theme directory. Even if there is a functions.php in there, you have to check to make sure it is registering the sidebar also.

    Thread Starter michaelul

    (@michaelul)

    Thanks for pointing me in the right direction! I am completely self-taught, and generally once I know what the next step is, I can learn it. I was just in a bit of a dead end there.

    You guys are right: my theme does not have its own functions.php. So I am going to swap in a functions.php file from another theme into my theme’s /wp-content area and put the widget code into sidebar.php and see if that works–then I’ll let you know how it turned out.

    Thanks again.

    Thread Starter michaelul

    (@michaelul)

    Seems to be working! I copied the functions.php file from the sandbox theme and got the best of both worlds: it supports 2 sidebars, so I still have my original and I now have widgets in the second sidebar! Pretty cool, thanks a lot!

    Here’s a tip too, you can add more sidebars by registering more in the functions.php file…

    Hi,
    I read this whole post,but I think I missed something. I’m using WP 2.2 with a theme that is widget ready and I’m already using some of the standard included widgets (search, pages, categories.)

    Now I have downloaded a third-party widget and would like to know how I can get that to show up as an option in the Sidebar Widgets in my admin screen. The widget I downloaded is a single php file. Where do I put this file? I don’t have any folder in my theme called widgets, but the current sidebar widgets definately work.

    After I uploaded the widge file somewhere, do I have to add some code to the functions.php file mentioned above? I looked at the functions.php file in my theme and the only thing in it is:

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar();
    ?>

    Is there no easy way to add new widgets to a theme (like prior to v.2.2 when you just installed the sidebar widget plugin,then dropped the new widget into the widget folder in the theme?

    The widget I downloaded is a single php file. Where do I put this file?

    wp-content/plugins

    widgets are just “fancy” plugins 🙂

    Thanks. I dropped the widget php file into my plugins folder but when I go to the Widgets tab of my Presentation menu, the new widget isn’t there. Do I have to add some code somewhere?

    No, but you have to activate it as with every plugin.

    I also see that the widget creator gives instructions to install the Sidebar Widgets plugin for WordPress 2.0 or higher. I thought the Widgets plugin was no longer needed with WordPress 2.2. In fact, I believe I’ve read other posts where people have had problems when they have both the Widget Sidebar plugin installed AND have the wp core widgets.

    Here’s the link to the widget instructions.
    http://www.mybloglog.com/buzz/community/com_widget_wp.php

    Why do you post instead of reading?

    Moshu,

    I did not see your “you have to activate it in plugins post” before I posted my next post where I mentioned the confusing widget creator’s instructions. I made that post immediately after my first post, as an after thought.

    Today, I received your post and my previous post in my inbox, so this is the first time I’ve seen your “activate it in the plugin directory” reply.

    In any event, I of course looked in my plugins in my Admin screens to try to activate it, but it does not show up there. When I first looked at the plugins list, I thought maybe it doesn’t show up because it’s a widget. Now you’ve told me that a widget is just a fancy plugin, so I’m assuming it SHOULD show up in the plugins list…but it doesn’t. I can’t activate it if it doesn’t show up in the list. The widget php file is definately in the plugins folder.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Can’t get widgets no matter what’ is closed to new replies.