Title: Correct syntax for loading a template
Last modified: July 15, 2024

---

# Correct syntax for loading a template

 *  [ferda2](https://wordpress.org/support/users/ferda2/)
 * (@ferda2)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/correct-syntax-for-loading-a-template/)
 * Hi, I need to load a template (content-single.php) into a child theme. Is this
   syntax correct or is there a better solution?
 * `get_template_part('../astra/template-parts/content-single');`

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Herman Asrori (BSF)](https://wordpress.org/support/users/bsfherman/)
 * (@bsfherman)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/correct-syntax-for-loading-a-template/#post-17897410)
 * Hi [@ferda2](https://wordpress.org/support/users/ferda2/),
 * Could you let us know the thing you would like to achieve by loading that specific
   file?
 * Kind regards,
    Herman 😊
 *  Thread Starter [ferda2](https://wordpress.org/support/users/ferda2/)
 * (@ferda2)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/correct-syntax-for-loading-a-template/#post-17900285)
 * Hi, I am loading custom templates according to conditions. If the condition is
   not met, I need to load the default template.
 *  [Herman Asrori (BSF)](https://wordpress.org/support/users/bsfherman/)
 * (@bsfherman)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/correct-syntax-for-loading-a-template/#post-17902575)
 * Hi [@ferda2](https://wordpress.org/support/users/ferda2/),
 * Will this [StackExchange thread](https://wordpress.stackexchange.com/questions/3293/include-files-in-child-theme-functions-file/62850#62850)
   help you?
 * Kind regards,
    Herman 😊

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Correct syntax for loading a template’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/astra/4.13.4/screenshot.jpg)
 * Astra
 * [Support Threads](https://wordpress.org/support/theme/astra/)
 * [Active Topics](https://wordpress.org/support/theme/astra/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/astra/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/astra/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Herman Asrori (BSF)](https://wordpress.org/support/users/bsfherman/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/correct-syntax-for-loading-a-template/#post-17902575)
 * Status: not resolved