WordPress Theme Download and Tidbits
First, we set up a plan on how we want our theme to look then we went ahead and created the style.css, this week I realized that it would take forever to get through this and decided to offer up the theme in it’s entirety as well as some code tidbits and such!
Both the sidebar and footer are widgetized. The footer is 3-column so I suggest using only 3 widgets in that area.
Onto the Tidbits
Asked by BabyDickey:
- I want to know how to make my own personalized headings for everything in the sidebar!
- I use a pre-made wordpress theme. but i want to add a widget area.. at header and/or footer. no idea how!
For a new widget area, and I do this ALL the time when I do a 3-column footer, is edit your functions.php file in the theme you are using and add the following to it:
if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'footer sidebar', 'before_widget' => '<div class="floatleft">', // Removes <li> 'after_widget' => '</div>', // Removes </li> 'before_title' => '<h3>', // Replaces <h2> 'after_title' => '</h3>', // Replaces </h2> ));
Bam! Go to your widgets page in the dashboard and you will now see a new “sidebar” area! Now in your footer.php or sidebar.php file, add this bit of code to where you want the widgets to appear:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer sidebar') ) : ?> <?php endif; ?>
Again, if you have any errors, questions, etc, just let me know!
Hopefully everyone enjoys the theme or at the very least learns something from it (by going over all the files and such) and the wee code bits!
This post is over a year old which means the content may be outdated or no longer accurate.