• Home
  • Archives
  • Contact Us

Updated :: Make Your Wordpress Themes Wigitized »

tag Categories :  Tips,Tricks and Hacks, Tutorials, WordPress
time Posted on Thursday, July 3, 2008 by Venkat | * Comments(2)

Most of the themes available now a days are wigitized but there are a few really good ones that are not wigitized.In this tutorial I’ll show how you can wigitize a WP Theme, which can make it really easy to manage the sidebars of a WP Theme.

To check if your theme is widget ready or not just head to Design -> Widgets.

WP-no-widgets

Which means your theme is not widget enable.

Follow these steps to enable widgets for your theme.

  1. Create a file functions.php in your theme directory.
    <?php

    if ( function_exists('register_sidebar') )

        register_sidebar();

    ?>

    If you want 1 side bar

    [ OR ]

    <?phpif ( function_exists('register_sidebars') )register_sidebars(2);?>

    If you want multiple sidebars.You can replace 2 with any number.
  2. After doing that go to Design -> Widgets and you can find thisWP-widgets
  3. Now displaying the sidebars in your theme, open your sidebar.php present in your template theme, look for the unordered list like in the example below and add this text right after the <ul> tag.
    <?php if ( !function_exists('dynamic_sidebar')

         || !dynamic_sidebar() ) : ?>
  4. And finally close the if loop with the endif before the closing unordered list tag</ul>.<?php endif; ?>
  5. For example like this
<ul id="sidebar-right">

<?php if ( !function_exists('dynamic_sidebar')

     || !dynamic_sidebar() ) : ?>

                <li><h2>Categories</h2></li>

        <?php wp_list_categories(); ?>

    <?php endif; ?>

</ul>

NOTE : If you more than one sidebar, the you have to give the sidebar number in the function like this

    <?php if ( !function_exists('dynamic_sidebar')

         || !dynamic_sidebar(2) ) : ?>

Here the 2 is the sidebar number.If there is no number mentioned then the first sidebar is used.

UPDATE : Wigitize the footer

TechUpdates in the comments asked whether the footer can be wigitized.So here’s how we can wigitize the footer

Step 1: open the functions.php that we created above and add the following lines after the register_sidebar() or register_sidebars(2)

    register_sidebar(Array("name" => "bottomleft"));

    register_sidebar(Array("name" => "bottommiddle"));

    register_sidebar(Array("name" => "bottomright"));

for Example :

<?phpif ( function_exists(’register_sidebars’) )

register_sidebars(2);

register_sidebar(Array("name" => "bottomleft"));

register_sidebar(Array("name" => "bottommiddle"));

register_sidebar(Array("name" => "bottomright"));

?>

Step 2 :Open the theme folder and look for footer.php

          In the file look where the footer div block starts and add these lines

<?php if ( !function_exists(’dynamic_sidebar’)|| !dynamic_sidebar(’bottomleft’) ) : ?>

<?php endif; ?>

The footer div block would look start with something like this

<div class="footer-box">


If the footer has some functions by default, you can leave them as is.The wigets will replace the default.

For Ex.

<div class="footer-box">

<?php if ( !function_exists(’dynamic_sidebar’)|| !dynamic_sidebar(’bottommiddle’) ) : ?>

<ul>

<?php get_recent_comments(); ?>

</ul>

<?php endif; ?>

</div>

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

TEST
tag Digg This! tag Stumble it! tag Add to Del.icio.us tag Netscape it! tag Google Bookmark It!

Read Latest Magazines For Free »

tag Categories :  FireFox, Freeware, Online Services, Plugins, Tutorials, Web 2.0, iPhone
time Posted on Tuesday, May 27, 2008 by Venkat | * Comments(0)

zinio-labsAmit Agarwal of Labnol has found an easy way to the latest magazines like PC Magazine, MIT Technology Review, Popular Mechanics, MacWorld, Lonely Planet, Reader’s Digest, etc without paying any subscription charges using Safari Browser for Windows.

Here’s how you can read them, in simple steps using firefox as shared by Gopinath M and remus.

  1. Install User Agent FireFox Addon [ addon homepage ] zinio-cover
  2. Add a new user agent,
    a. Navigate to Tools –> Addons –> Select User Agent Switcher and click Options –> Click User Agent and Press Add [ To add new user-agent ] .
    b. Enter the following details* Description: iPhone
    * User Agent: Mobile Safari 1.1.3 (iPhone; U; CPU like Mac OS X; en)
    * App Name: AppleWebKit/420+ (KHTML, like Gecko)
    * App Version: Version/3.0
    * Platform: Mobile/1A542a Safari/419.3

    zino

  3. Change the User-Agent to iPhone and browse to zinio.com/iphone and start reading your favorite magazines for free.
Technorati Tags: iPhone,Firefox hacks,Magazines,hacks
TEST
tag Digg This! tag Stumble it! tag Add to Del.icio.us tag Netscape it! tag Google Bookmark It!


Add this blog to my Technorati Favorites!

Enter your email address:

Delivered by FeedBurner

  • RSS Guide To A Carrer Abroad

    • TOEFL : What & Who Needs To Give This Exam
    • GUIDE : How To Book Your GRE Slot
    • What Is GRE and TOEFL ?? Who Needs To Give These Exams
    • Visa Experiences
    • What To Expect On Your Way To USA ?
    • Visa Experience Fall 2008 May 20th
    • Visa Expericence May 22, 2008 Mumbai
    • Fall 2008 : Visa Experiences
    • What Are Emergency Slots ?? Availability and Who Qualifies For Them
    • Steps To Schedule A F1 Visa Interview
  • TECH YARD Copyright © 2008 | Disclaimer & Privacy Policy | Slick Blue Theme by Kyle Eslick