Title: Modifying functions.php to include shortcodes.php
Last modified: August 22, 2016

---

# Modifying functions.php to include shortcodes.php

 *  Resolved [dealfiles](https://wordpress.org/support/users/dealfiles/)
 * (@dealfiles)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/modifying-functionsphp-to-include-shortcodesphp/)
 * As outlined on another thread, I have copied my shortcodes.php file to my Child
   Theme directory, and now I want to require the file using the Child Theme’s functions.
   php file, but i am uncertain how to do this.
 * I am trying to customize the ‘listings’ shortcode to include new Properyy details
   that I set up in the functions.php file.
 * Thanks.
 * [https://wordpress.org/plugins/wp-listings/](https://wordpress.org/plugins/wp-listings/)

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

 *  Plugin Author [agentevolution](https://wordpress.org/support/users/agentevolution/)
 * (@agentevolution)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/modifying-functionsphp-to-include-shortcodesphp/#post-5468799)
 * Add to your functions.php:
 * `require_once get_stylesheet_directory() . '/shortcodes.php' ;`
 *  Thread Starter [dealfiles](https://wordpress.org/support/users/dealfiles/)
 * (@dealfiles)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/modifying-functionsphp-to-include-shortcodesphp/#post-5468801)
 * Thanks, but when I add that line to my theme’s funtions.php, it breaks the theme.
 *  Plugin Author [agentevolution](https://wordpress.org/support/users/agentevolution/)
 * (@agentevolution)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/modifying-functionsphp-to-include-shortcodesphp/#post-5468802)
 * What is the error? That should point you in the right direction. You probably
   need to edit the shortcodes.php and rename the shortcode and its function so 
   they have a different namespace than the default shortcodes.
 *  Thread Starter [dealfiles](https://wordpress.org/support/users/dealfiles/)
 * (@dealfiles)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/modifying-functionsphp-to-include-shortcodesphp/#post-5468803)
 * I’m not sure what the exact error is, but it freezes my WordPress dashboard, 
   and no changes are made to the site, so I believe it’s still pulling from the
   shortcodes.php file in the plugin folder, rather than the one in the theme folder.
 *  Plugin Author [agentevolution](https://wordpress.org/support/users/agentevolution/)
 * (@agentevolution)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/modifying-functionsphp-to-include-shortcodesphp/#post-5468804)
 * Yes, it is, and it will. Which is why you need to change the name of the shortcode
   and the functions in your custom shortcodes file.
 *  Thread Starter [dealfiles](https://wordpress.org/support/users/dealfiles/)
 * (@dealfiles)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/modifying-functionsphp-to-include-shortcodesphp/#post-5468805)
 * Bingo!
 * Thanks.

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

The topic ‘Modifying functions.php to include shortcodes.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-listings_978e8f.svg)
 * [IMPress Listings](https://wordpress.org/plugins/wp-listings/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-listings/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-listings/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-listings/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-listings/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-listings/reviews/)

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)

 * 6 replies
 * 2 participants
 * Last reply from: [dealfiles](https://wordpress.org/support/users/dealfiles/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/modifying-functionsphp-to-include-shortcodesphp/#post-5468805)
 * Status: resolved