FUBARgenre: The Genre of Fubar

taking the bar out of fubar

How to Widgetize Yichi’s Resurrection Theme

By Yan • Sep 25th, 2007 • Category: Wordpress Themes

Like many of you, I’ve fallen in love with Yichi’s Resurrection theme for Wordpress. It’s a great theme with stunning visuals. The only hitch is that it’s not widget-ready.

If you’re too lazy busy to hard code the php in the sidebar whenever you want to incorporate some changes, then a non-widget compatible theme is not really the best option. So I took the time to widgetize Resurrection. It’s not as complicated as it sounds. Here, I will attempt to show you how.

But if you’d rather skip these steps, you can go right ahead and download the widget-ready Resurrection theme. I’ve posted the download link at the end of this post.

If you’re as inquisitive as I am, though, you’d want to try to widgetize the theme yourself. It’s quite fun, actually. Or does that sound too geeky? :lol:


How to Make Yichi’s Resurrection Theme Widget-Compatible:

Open sidebar.php. Go to the area right under <div class="clear"></div>. Above <div class="recent-posts">, add the following lines:

<div id="sidebar1">
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar1') ) : else : ?>

and right above Categories, <div class="cat">, insert the following:

<?php endif; ?>
</div>
<!-- End of #sidebar1 -->
<div id="sidebar2">
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar2') ) : else : ?>

To close your second sidebar, add the following right above <div id="sbm">:

<?php endif; ?>
</div>
<!-- End of #sidebar2 -->

The revised area in my sidebar.php now looks like this (Note that I deleted the “sponsors” and “del.icio.us” classes. You can easily add these as widgets later on):

<div id="sidebar1">
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar1') ) : else : ?>
      <div class="recent-posts">
      <h2>Recent Posts</h2>
      <ul>
      <?php // I love Wordpress so query_posts('showposts=16');?>
      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
      <li><a href="<?php the_permalink() ?>">
      <?php the_title() ?> </a></li>
      <?php endwhile;  endif;  ?>
      </ul>
      </div>
<?php endif; ?>
</div>
<!-- End of #sidebar1 -->

<div id="sidebar2">
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Sidebar2') ) : else : ?>
      <div class="cat">
      <h2>Categories</h2>
      <ul>
      <?php wp_list_cats('sort_column=name&hierarchical=0'); ?>
      </ul>
      </div>
      <div class="monthly">
      <h2>Monthly archives</h2>
      <ul>
      <?php wp_get_archives('type=monthly&limit=6'); ?>
      </ul>
      </div>
<?php endif;  ?>
</div>
<!-- End of #sidebar2 -->

And voila, we’ve made a dynamic sidebar. For the changes to take effect, however, we need to create another file named functions.php. To do this, simply create a blank file and name it functions.php. Add then add the following code:

<?php
// Widget Settings

if ( function_exists('register_sidebar') )
register_sidebar(array(
   'name' => 'Sidebar1',
   'before_widget' => '<div class="leftsidebar">',
   'after_widget' => '</div>',
   'before_title' => '<h2>',
   'after_title' => '</h2>',
));

if ( function_exists('register_sidebar') )
register_sidebar(array(
   'name' => 'Sidebar2',
   'before_widget' => '<div class="rightsidebar">',
   'after_widget' => '</div>',
   'before_title' => '<h2>',
   'after_title' => '</h2>',
));

?>

Your dynamic sidebar is ready. Well, almost. It should be working fine now, but we need to make sure that any widgets we add to the sidebar conform to the theme’s design. To do this, open styles.css and add the following right below the main div#sidebar elements:

/* This is the left widgetized sidebar - added by FubarGenre.com */

#sidebar1 {
width: 200px;
float: left;
background:#005b8e url(images/bottoml.gif) no-repeat bottom left;
padding-bottom: 50px;
}

#sidebar1 .leftsidebar {
font:11px arial;
background:#005b8e;
}

#sidebar1 .leftsidebar h2 {
margin: 5px;
font:bold 12px Arial, Helvetica, sans-serif;
text-transform:uppercase;
color:#fff;
}

#sidebar1 .leftsidebar ul {
margin: 0px;
padding: 0 0 10px 0;
}

#sidebar1 .leftsidebar li {
margin: 0px;
padding: 5px 5px 5px 18px;
list-style-type: none;
background:url(images/left-folder.gif) no-repeat 5px 50%;
}

#sidebar1 .leftsidebar li a {
text-decoration:none;
border-bottom:1px dotted #0a72ac;
}

#sidebar1 .leftsidebar li a:hover {
text-decoration:none;
border-bottom:1px solid #eee;
}

/* This is the right widgetized sidebar - added by FubarGenre */

#sidebar2 {
float: right;
width: 200px;
background:#0b3262 url(images/bottomr.gif) no-repeat bottom right;
margin-top: 0;
padding-top: 0;
padding-bottom: 50px;
}

#sidebar2 .rightsidebar {
font-size:11px;
}

#sidebar2 .rightsidebar h2 {
margin: 5px;
font:bold 12px Arial, Helvetica, sans-serif;
text-transform:uppercase;
color:#679ef1; height:30px;
}

#sidebar2 .rightsidebar ul {
margin: 0px;
padding: 0 0 10px 0;
}

#sidebar2 .rightsidebar li {
margin: 0px;
padding: 5px 5px 5px 18px;
list-style-type: none;
}

#sidebar2 .rightsidebar li a {
text-decoration:none;
border-bottom:1px dotted #225999;
}

#sidebar2 .rightsidebar li a:hover {
text-decoration:none;
border-bottom:1px solid #ccc;
}

And that’s it. You may now use sidebar widgets on the Resurrection theme.

:cool:

I hope this helps.

Questions? Ask away.

:razz:

Meanwhile, you may download the widget-ready Resurrection theme from here..


(Yeah, Gen. I’m a geek :roll: )


Yan (a.k.a. Yannie, YanYan) is a young-ish entrepreneur, writer, poet, artist, graphic designer, web geek, lover, friend, daughter, connoisseur, gourmand, amateur chef, coffee addict, control freak, and incessant dreamer. Not necessarily in that order.
© 2008 FubarGenre | All posts by Yan

29 Responses »

Comments

  1. i’ve downloaded this theme before but i opt to use this, the sidebar always show fatal error below the twitter thing. How’s that? do i need to make changes first like the one you said above before using it? sorry but i’ve no enough knowledge on this.

  2. Btw, this is the message that always show,

    Fatal error: Call to undefined function: aktt_sidebar_tweets() in /home2/pinoyam/public_html/sub/wp-content/themes/Resurrection-theme/themes/sidebar.php on line 14

    hope you can help. thanks

  3. Hi, Ambo. You need to download the Twitter Tools plugin first. Activate the plugin and then refresh your theme.

    You don’t have to apply the changes above unless you want to make the theme widget-compatible.

    :-)

  4. wow thanks ha. can i go back here if ever na meron akong di maintidihan pa sa theme na to? thanks uli in advance yen.

  5. no worries. i’d love for you to keep coming back. :razz:

    and by the way, it’s yan. not yen. :lol:

  6. Ahaha im sorry Yan. Ha Yan ok na ha? :mrgreen:

  7. hahaha. yan ang gusto ko :lol:

  8. Very nice job, thank you :)
    i’m trying it right now

    Kudos for the job! ^^b

  9. by the way, thanks for your comment on my blog abit this post ^^; i didn’t saw it..
    Again..Kudos for the Job, really good job! works perfectly ^-^b

  10. No problem, Dre. Glad to help. :mrgreen:

    I just checked out your blog, and your sidebar seems to have some issues still. Need help?

  11. looks like everything is on the right place now ^-^
    thanks to your widgeted version of resurrection ^^b
    thank you very much for the help (^-^)(_ _)(^-^)

    looks like i have to post a lot now ^^;

  12. It’s my pleasure, Dre. :)

    No wonder I was seeing a skewed sidebar. Your old layout was cached in my browser. I had to purge my cache files.

    Looks great now! Congratulations! And have fun blogging. :razz:

  13. >

  14. my comment got messed up >_>

  15. >_

  16. No worries. I don’t understand those glyphs, anyway. But I suppose that’s a smile? :cool:

  17. well, kinda…actually there was a full text..but bah, anyway.. :mrgreen:

  18. sort of.. :mrgreen:
    i’m still trying to figure out how does wordpress work.. :mrgreen:

  19. i’m still trying to figure it out myself. :wink:

  20. Hello, I try to make the “Footer” Widget ready. Can you help me?

    My Blog: http://www.lulu-crew.com

    Greeting Frank

  21. Hi, Frank. Sure, I’ll try. What exactly do you need from me? What can I do for you?
    :mrgreen:

    How’s your “widgetizing experiment” (for lack of a better term) going so far?

  22. has anyone experienced a messed sidebar layout in the resurrection theme? the twitter area is messed up. i just copied the files to the themes folder

  23. aah.. it’s ok now.i managed it to layout nicely. my question. is there a workaround if you wish to add archive and set it as dropdown? because the alignment is always to the left. there’s no option to make it center. thanks

  24. hi, i have a question. how can you make the archive dropdown be centered? coz it aligns itself to the left and doesnt look good in my blog site.

    i also tried adding a search engine but it doesnt work. :( thanks

  25. I’m gonna take this entry as a resource for widgetizing my current temp from yichi as well.

  26. Really, I love you for this!!

  27. I esteemed yours blog,
    thanks the author a lot of useful to myself have found..

  28. Hi, i don’t know whether it’s a load error on my side, but I can’t see the blue column next to the main text.


Trackbacks & Pingbacks: Pages that Link to this Post

  1. [...] di installare i widget nelle due sidebars di destra; ma navigando un pochino ho trovato questo sito che mette a disposizione una guida per rendere il tema widget ready o, in alternativa, consente di [...]

Leave a Reply