views:

18

answers:

2

I have put some php code in a sidebar-01.php

i like in my template file to get that code

How do u do that ? (i don't what to change the code of WP for updating purpose)

i have try include('sidebar-01.php); - it don't work

i like to have a function like : get_header(); for my file, something like : get_file('sidebar-01')

is it possible ?

+1  A: 

Try the get_sidebar() function defined in wp-includes/general-template.php

softcr
+1  A: 

Go to the 'Theme Editor', look for sidebar.php. Edit it and place this code there:

include('sidebar-01.php');

Also, remember to place your sidebar-01.php in same folder as the other theme .php files (basically your theme folder).

shamittomar