Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Talk:Customizing Your Sidebar

Should this page mention that it is now outdated and to proceed with caution or something along those lines? Nquinlan

I'm being overly critical: but should we be referencing plugins in these Lesson pages? Lorelle's guide speficially fobids plugins.

I've also got a different way to handle "Asides"-like links which uses core features. I created a link category called "Elsewhere" (category ID #5). I link to my "aside" links by placing them in my "Elsewhere" link category, and giving them simple titles / descriptions. Then, in my sidebar.php, I use this:

<h3>Worth Visiting:</h3>
<ul id="elsewhere">
<?php get_links(5, '<li>', '</li>', ' ', FALSE, '_id', FALSE, FALSE, 3, FALSE, TRUE); ?>
</ul>
skippy 14:30, 24 Apr 2005 (UTC)


Not forbid, but "limit". I wrote it. For this kind of article, we can't get away from adding informtion about plugins, which is why I wrote it. I wanted to highlight how to use plugins in an article without making them the core purpose of the article. I hope to have articles that feature details on how to make plugins (more step-by-step for newbies than the other docs) and that will bring up plugins.
EDITED MY COMMENTS - Until I started adding what you posted above, I didn't realize how PERFECT it was. I thought it was a plugin of yours that you were talking about. Sorry, I've been trying to edit and work on too much at the same time to get ready for the public release. I've added your stuff, so tell me if I did it right. You are one wise dude!
I've used code and other things in the article I'm not sure about, so please edit and check it for me, please, Skippy. I want to release this tonight or in the morning. Thanks! Lorelle 19:04, 24 Apr 2005 (UTC)

Looks fine. The only posisble problem is the "Different Sidebars Anyone?" section, and the example include() statements. The include may fail because it's looking for the file to include in the current working directory, which is usually the WordPress root. I like to explicitly call out the TEMPLATEPATH constant:

include( TEMPLATEPATH . "/side2.php");

or possibly use a template function:

include( get_template_directory() . "/side2.php");

In my Loop Lesson, I used both of the above; but I didn't explain the constant TEMPLATEPATH... I probably should. Or replace it with the function, to keep the number of new ideas down to a minimum.

skippy 03:06, 25 Apr 2005 (UTC)
As for shoulds, go ahead if you want, because I think it's a good idea. As for the get_template-directory() - please add it to this article. It's a great example and when your Looop is published, let's make sure a link to it goes from this spot to there. Great work. Thanks! Lorelle 03:42, 25 Apr 2005 (UTC)


Since many themes come without calendar but users tend to want it, it would be good at least to mention how to include the calendar call in the sidebar. Moshu 15:19, 9 Jul 2005 (UTC)