Currently viewing the tag: "blogs"
I had a huge huge headache the last time when I didn’t have widgets on my blog. So I’m revisiting this tutorial again. Basically what you have is a theme which is not widget ready.. ugh, even the mention of that sickens me. What I’m going to share is how to create a widget for your sidebar on your non-widget ready theme.First of all, please go to this site. This is the real guru for widgetizing a theme What we would like is to have this page on wordpress.

Wordpress Widgets

 and not THIS!

Wordpress Theme No Sidebars

When you find your sidebar.php.. it will have code that looks something like this – base on widget sidebar of Kubrick the classic wordpress theme.
<div id=”sidebar”> <li id=”about”> <h2>About</h2> <p>This is my blog.</p> </li> <li id=”links”> <h2>Links</h2> <ul> <li><a href=”http://example.com”>Example</a></li> </ul> </li> </ul>
Looks quite terrifying yes? No worries, then from here what you do is you just add these two lines into it.
<ul id=”sidebar”>  <?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar() ) : else : ?> <li id=”about”> <h2>About</h2> <p>This is my blog.</p> </li> <li id=”links”> <h2>Links</h2> <ul> <li><a href=”http://example.com”>Example</a></li> </ul> </li> <?php endif; ?> </ul>
That’s it! oh WAIT  no not yet! You have to create a functions.php file for it if your theme doesn’t already have one. Don’t fret, just open up either dreamweaver or even a note pad and save the file as  functions.php and this is what you have to type in it
<?php if ( function_exists(‘register_sidebar’) ) register_sidebar(); ?> 
If you need more than one sidebar no probs just key this in.
 <?php if ( function_exists(‘register_sidebars‘) ) register_sidebars(n); ?> **(n) n refers to the number of widget sidebars you want to register.
If you look at the new wordpress 2 themes and above they would have a function page that looks like so
<?php if ( function_exists(‘register_sidebar’) ) register_sidebar(array( ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</li>’, ‘before_title’ => ‘<h2 class=”sidebartitle”>’, ‘after_title’ => ‘</h2>’, )); ?>
HAHHH???? what the heck where did that code come from? I had another headache because, great now where am i going to add this section  register_sidebars(n) in? Well it was quite simple it seems, you just put the number here
<?php if ( function_exists(‘register_sidebars‘) ) register_sidebars(n,array( ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</li>’, ‘before_title’ => ‘<h2 class=”sidebartitle”>’, ‘after_title’ => ‘</h2>’, )); ?>
So yeah, that was my widget headache solution. Hope this helps out anyone out there.
I really can’t wait for this party! I dunno why but I’m really psyched to be meeting all you bloggers again.

Nuffnang Pajama Party

Nuffnang Pajama Party Details

Map to Borneo Baruk Club

 

After blogging for about a year and a half now – well technically i started in 2005, but that doesn’t count since i wasn’t an avid blogger – I have com to realise how much I love doing this, not so much as a hobby but as a means of communicating with my fellow bloggers out there. Mister G had asked me this question last week, when my blog was down, “What does your blog mean to you? Why are you so upset that you can’t go in?” Well to answer that question, it means so much to me because, this is more than just a place where i lay down my scattered thoughts. But it is my medium where i get to share things with others that could be either helpful or meaningful (of course some are pure rubbish). Furthermore, it brings me closer to people from all over the place. People whom I have never met before and yet I feel that they are not terrible strangers to me, because of their blogs and what they write on it. I suppose you can say that a blog will express your inner being and personality. As how you write will define to a certain extent what type of character you are. Oh and the joy I have the most, was meeting long lost friends. I managed to meet two people in particular that I thought i had lost contact from and never saw them for about 10 years…give or take. Which are David Chong and Christine Ho, both that i had met when i was very young learning the ways of ballet from David’s mummy :) . Like Kenny Sia mentioned at the YouthMalaysia event, for him some of the bloggers out there have turned out to be some of his closest friends. I can relate somewhat with that. Overall I’m glad that I have been blogging and I’m even happier at the new people have met in the past few months. The first blogger I met was Mister Timothy Tiah in the flesh hahhaa… which then followed on to other people Pink Pau. And who’d have thunk that Miss Pamsong would be my colleague at McCann and Missa Pammie, i’m being nice and I’m pimping you bwahahahha :P I don’t think i got to mix as much as i would’ve liked but i’ll make sure i’ll mingling a lot this coming party. It has been a joy and I can’t wait to go for the bloggers pajama party… oh man I’m so excited!!! And I love what Nuffnang has done. As much as it is an online business, but I love how their philosophy is to also bring the bloggers together, chill and have fun. Awwww… the blogging family hehe :) Nuffnang you know we love you.