Jump to content
xisto Community
Sign in to follow this  
ashutosh_malguri

Making Wordpress Themes :part 3

Recommended Posts

Next comes the sidebar:

quote from wordpress

a narrow vertical column often jam-packed with lots of information about a website

This defines the sidebar quite nicely . You can see the sidebar on righ or left of your pages(most cases).It is a very important and powefrul part of your blog/website and cannot certainly be ignored .. It should look good but no clustered , it mostly should be clean and decent (untill you are making a crazy blog/website)
The sidebar file is in the same theme directory for eg. in case of default thems the path:\wp-content\themes\default

like header you need to include the sidebar in the index.php with the function

get_sidebar() i.e <?php get_sidebar(); ?>

These are some of the basic thing you could in the sidebar mentioned by wordpress

Nested Lists Navigation
Post Lists
Meta Data
Link Lists
Link List of Authors
Ads
Meta

and there are many more actually you can put anything any image, banner , slideshow ,ad, plugin(TWITTER ETC) or even articles for that matter(but is useless and will make the design suck)

To edit/customise the sidebar open sidebar.php you can see the code you cna add any new widget or sidebar entity to the sidebar this will be usually placed between <ul><li>[content]</li></ul> format because most of the items displayed in the sidebar
Understanding the code syntax: example code
<h2>archives</h2><ul>   <?php wp_get_archives('type=monthly'); ?>php</ul>
This code will show The monthly archives in a list
wp_get_archives('type=monthly') is a wordpress functions......there are many more wordpress functions which help you with your sidebar
have a look at them here here https://codex.wordpress.org/Function_Reference/ (most of them can be used in sidebar use logic and think bout that)
Theme related functions, classes, misc funstions have most of the functions that cannot be used(logically)

you can find many sidebar plugins on wordpress official website.

You can also setup more of these types of function (plugins : They mostly work on the the concept of including functions that comes with the plugin to sidebar code like one above)

You can ad more style to your lists , arcives etc with help of css.

Not only this you dont nessessary need to include a function to embed somting to the side bar you can insert any plain code(html,javascript etc) banner, image, slideshow etc
as been correctly said by wordpress in their offecial website "Did you know you could put anything you want in your sidebar"

One more important thing , you can add as many side bars as you want ,yes more then one .. either both on left or one on left and one on right
Wordpress has eloborated this point quite nicely plz visit this link http://forums.xisto.com/no_longer_exists/ - to read it under heading "Different Sidebars Anyone?"

I also recommend to go through the whole page instead....

-thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.