You may be familiar with our set of articles here on JungleJar explaining how to widgetize your Wordpress templates.

Since the tutorials were first posted, there have been a few code optimizations that have been noted. All tutorial files were updated and we’ve included the below code to call sidebars to add onto and improve the “Widgetize Your Wordpress Theme” article series.

Calling The Sidebar

1
<?php include ('sidebar2.php'); ?>

This would call on sidebar2.php and display it based on where the PHP include tag is in the PHP template file. The older code used in the tutorial was..

1
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?>

As you can see, the TEMPLATEPATH is not needed.

Calling The Sidebar Again..

1
<?php get_sidebar('right'); ?>

This is another way to call a sidebar. The above code would call on our TEMPLATEPATH . ’sidebar-right.php’ file.

Related posts on JungleJar:

Tagged with:
Categorized as: articlesautomatticcmsdevelopmenttutorialswebdevelopmentwordpress


5 Brilliant Insights!

Have valuable insight?


CommentLuv Enabled
preload preload preload