features category image instructions category image Sidebar Elements

Posted on October 23, 2009 and last modified on October 28th, 2009.

FreshlyPressed comes with a feature packed sidebar already in place. There are so many aspects to it, we need to dedicate several posts just to this sidebar alone.

In terms of elements contained within the sidebar, the following list of elements apply:

  • Random Post
  • Dated Messages
  • Admin/Meta
  • Archive List
  • Archive Drop Down Box
  • Link List
  • Category List
  • Category Drop Down Box
  • Popular Posts
  • Tag Cloud
  • Tag Drop Down Box
  • Pages
  • Recently Added Posts
  • Recently Updated Posts
  • Recent Comments
  • Latest Tweets
  • Top Comments
  • Login Box

Each element is separated into a different php file [appropriately named as SE_categories.php etc] and is contained within the theme files directory, rather than a sub-directory. Why? Because this means you can work on the files via the admin panel with each php file containing the code required to display the sidebar element.

Consequently, each file is called via the sidebar itself as follows:

<?php include(\'sidebar_element_categories.php\'); ?>

Additionally, each element is wrapped in a piece of code which displays each sidebar element within a tabbed display, i.e.

    <div class="tabbertab">
<!-- CATEGORIES -- >
<?php include(\'sidebar_element_categories.php\'); ?>
    </div>

The advantages of this method of sidebar implementation are numerous:

1. It is an ordered system in that it it is easy to maintain and easy to edit. New code and elements can be added just as easily and given your own personal ‘touch’.

2. As many of the sidebar elements have been hand coded there are far less plugins required overall. The use of the theme function file has allowed for this system to be put in place with great effect.

3. The tabbed system which displays all of the sidebar elements has already been adjusted within the CSS file to suit the colours and overall design. The simple addition of the tabbed code as outlined above, means you can add or remove as many sidebar elements as you wish.

This briefly describes the manner in which the sidebar elements work, now let’s take a look at how the sidebars within each page can be adjusted to suit each page’s individual style. Go look now…

Related Posts:

Page/Post Option – Left, Right or No Sidebar

About the author

James has added 29 posts to this site so far...

Founder and co-admin at FreshlyPressed, James also runs and maintains many, many other sites including JamesICT which is very much focussed on WordPress and all of its little idiosyncrasies. He now lives in Brighton, England with his fiancée and writes novels in his spare time. His latest work, 'Procrastination Expectancies' is due out later this year - or maybe the year after that! [more...]

Other posts by James

Trackbacks/Pingbacks

  1. [...] means of changing the sidebar content within this theme and many of them are discussed at length here and here. However, the purpose of this post is to explain the positioning of the sidebar and which [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>