Title: Include a theme file function
Last modified: August 18, 2016

---

# Include a theme file function

 *  [music_man](https://wordpress.org/support/users/music_man/)
 * (@music_man)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/include-a-theme-file-function/)
 * Hi
 * I have looked at many webpages trying to figure out a way to do this. Can I make
   a function (in functions.php) that I can include rightside.php (that is in my
   theme directory) into my template?
 * So in my Main Index Template template file I can go <?php get_rightside(); ?>
 * Cheers

Viewing 1 replies (of 1 total)

 *  [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/include-a-theme-file-function/#post-408987)
 * You don’t need to add the function, you can simply do an include.
 * <?php include('rightside.php'); ?> or <?php include (TEMPLATEPATH . '/rightside.
   php'); ?>
    Either way will work.

Viewing 1 replies (of 1 total)

The topic ‘Include a theme file function’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * Last activity: [19 years, 11 months ago](https://wordpress.org/support/topic/include-a-theme-file-function/#post-408987)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
