Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14120 reviews 1680 hosting providers

Questions & Answers

Sidebar files in a different folder

Oct 4, 2012 by DinoGuy
Hi

I want to put the sidebar files in a separate folfer in order to keep them organized because I have many of them. My question is, if I did this how will I be able to retrieve files when calling the function get_sidebar();

thanks

2 Answers

0 votes
Oct 4, 2012 by WebProX
hi there
Try using get_template_part() instead:
http://codex.wordpress.org/Function_Reference/get_template_part
0 votes
Oct 4, 2012 by expert
if your side bar is 'sidebar-home.php' in the subfolder 'sidebar' then you can try:
get_template_part('sidebar/sidebar-home');