Title: For inserting PHP code &gt; require_once(), what path should I use?
Last modified: July 19, 2022

---

# For inserting PHP code > require_once(), what path should I use?

 *  Resolved [mplusplus](https://wordpress.org/support/users/mplusplus/)
 * (@mplusplus)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/for-inserting-php-code-require_once-what-path-should-i-use/)
 * Hi there
    For inserting PHP code > require_once(), what path should I use? The
   code below did not work. `include_once ('/wp-content/themes/underscores/sb/inc_form.
   php');`
 * Thank you.

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

 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/for-inserting-php-code-require_once-what-path-should-i-use/#post-15837422)
 * Hello.
 * This function takes the full path anyway. Use global WordPress variables, for
   example WP_CONTENT_DIR
 *  Thread Starter [mplusplus](https://wordpress.org/support/users/mplusplus/)
 * (@mplusplus)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/for-inserting-php-code-require_once-what-path-should-i-use/#post-15848337)
 * Hi [@webtemyk](https://wordpress.org/support/users/webtemyk/) it worked like 
   a charm, thank you!

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

The topic ‘For inserting PHP code > require_once(), what path should I use?’ is 
closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3523853)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mplusplus](https://wordpress.org/support/users/mplusplus/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/for-inserting-php-code-require_once-what-path-should-i-use/#post-15848337)
 * Status: resolved