How Can I Edit the Widgets?

Written by Bec on November 17, 2008 – 8:30 AM -

One of the neatest features to WordPress is the widget. With a simple click, a drag and drop, you have customized sidebars in no time flat. But what if the widget just doesn’t display correctly for your theme? Where are the darn things and can they be adjusted?

Answer: Yes, if you’re comfortable editing code, you can edit them, and they’re located on the widgets.php file located in the includes folder of WordPress. You can’t edit this from the design or plugin areas, so you’ll have to download it and do your edits on your drive, and then replace the page online when you’re finished. Reminder: COPY the page before you edit and tuck it in another folder just to be sure you have the original in case something goes wrong!

For example, I just had a client who asked for some setup help, and upon activating the Tag Cloud Widget, I saw that the font size and the number of tag words was just too much for the sidebar space alloted via the template theme he was using. Words were crammed in over others, and the font size had words busting out over the blog edges. Here’s where I did a little editing magic to bring things back into proper scale for his blog:

File to manipulate in a program like Dreamweaver or Notepad: wp-includes/widgets.php

Find this entry around line 1372:

Make your changes to:

“smallest” = the size of the smallest font you want
“largest” = the size of the largest font you want
“number” = the amount of tags you want to appear
“orderby” = is how the orders of the tags will be shown

With some careful customizations of your widgets, you can have full control back on how things look on your blog!

Tags: , ,
Posted in Articles & Tutorials, Blog Plugins & Widgets, Design Tips & Tools | 2 Comments »