How to make Wordpress support Widgets

lair360

New Member
Messages
200
Reaction score
0
Points
0
Version: 32.1
Revision: 34 Build 62

How to make Wordpress support Widgets

Introduction:
for user’s who has a theme that doesn’t support: “widget enabled sidebars”, you can use this tutorial to enable it…

Notes: you'll need an FTP application or Cpanel to accomplish this task!

1.] Download notepad++ from the original author or from a mirror and install the software.
-------------------------------
http://sourceforge.net/projects/notepad-plus/
http://filehippo.com/download_notepad/
-------------------------------

2.] Look inside your “sidebar.php” and it should look like this or similar...
--------------------------------------

Code:
<div id="sidebar">
<ul>
<?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>

<li><h2>Archives</h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
</ul>
</div>
--------------------------------------

3.] Add two of these codes after <ul> and before </ul> ~just before </div> if you want to know exactly where it’s labeled.

a.]
Code:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
b.]
Code:
<?php endif; ?>
--------------------------------------

Code:
<div id="sidebar">
<ul>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>

<li><h2>Archives</h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
<?php endif; ?>
</ul>
</div>
--------------------------------------

4.] Save “sidebar.php” and create another file called: “functions.php” and copy this code into your notepad…

---Copy Source Code---

Code:
<?php
if ( function_exists('register_sidebar') )
register_sidebar();
?>
---End Source Code---

Notes: If you have more than one sidebar, then use the following in “functions.php” instead, where ‘2’ is the number of sidebars you have [change this to how many you actually have]…

--------------------------------------

Code:
<?php
if ( function_exists('register_sidebar') )
register_sidebar(2);
?>
--------------------------------------

That’s it! You should now be able to drag and drop widgets from your “Widgets tab” to your sidebar. Keep in mind that if you use even a single widget from the available widgets, then your sidebar as you know it will be replaced with a new sidebar showing the widgets that you’ve placed!

Copyrighted By Lair360 ~2008
 
Top