Support » Themes and Templates » WordPress Widgets
WordPress Widgets
-
I’m back. Basically, I’m trying to widgetize my Red is Nice theme, and I’m having problems. I’ve done everything the article says, and yet when the code is in place the sidebar and footer dissapear (as seen here). I’m no php genius so I need help.
P.S. I’ve tried both the php line from the tutorial page as well as the one used in kubrik.
-
I still can’t get it to work.
yet when the code is in place the sidebar and footer dissapear
Well, the sidebar is supposed to disappear. That’s sort of the point, you’re replacing the sidebar with widgets. Go to the widgets control panel and put some widgets on the sidebar. Admin->Presentation->Sidebar Widgets.
As for your missing footer, probably you forgot to close the if statement on one of the sidebars.
I realize that it’s supposed to dissapear. I mean that it’s simply a blank space. 😉 And as far as putting widgets in the sidebar, those have been selected too (archives, search, links and some others). For whatever reason it just dosn’t want to work.
And I’m pretty sure my code’s fine – it validates perfectly, after all.
winnopeg: Okay, what is the exact code that you have at the top of the functions.php file (the register_sidebar stuff) and what is the exact code that you have at the top of the sidebar files (the dynamic_sidebar stuff)?
functions.php :
<?php
if ( function_exists('register_sidebar') )
register_sidebar();
?>sidebar.php (at the moment)
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
(though I have also tried this) :
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>The functions.php you have should work fine with the latter bit of code for the dynamic sidebar (not the “at the moment” one). However, with that dynamic_sidebar() call, don’t forget to include the endif; line after the rest of the page (but before the /ul).
That’s what was wrong – I overlooked the other line of code. It works now, though the calendar don’t really work. Anyways, thank you.
- The topic ‘WordPress Widgets’ is closed to new replies.