Title: Error when calling PHP function from theme file
Last modified: August 21, 2016

---

# Error when calling PHP function from theme file

 *  [Kemory Grubb](https://wordpress.org/support/users/w33zy/)
 * (@w33zy)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/error-when-calling-php-function-from-theme-file/)
 * I am trying to call `<?php display_business_directory(); ?>` function from a 
   page template in my theme but i am getting a PHP error of
    Warning: Missing argument
   1 for display_business_directory(), called in C:\wamp\www\wordpress\wp-content\
   themes\blog\page-directory.php on line 9 and defined in C:\wamp\www\wordpress\
   wp-content\plugins\ldd-business-directory\lddbd_display.php on line 11
 * Any help would be appreciated
 * [http://wordpress.org/plugins/ldd-business-directory/](http://wordpress.org/plugins/ldd-business-directory/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [LDDConsulting](https://wordpress.org/support/users/suffrage/)
 * (@suffrage)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/error-when-calling-php-function-from-theme-file/#post-4282029)
 * There are 2 ways to fix the problem you’re having:
 * 1) You could remove `$atts` from the function `display_business_directory()` 
   in the lddbd_display.php file to remove the error message you’re getting.
 * OR
 * 2) You should be able to use `do_shortcode('[business_directory]')` to achieve
   the same effect.
 * Let us know if this helps out any!

Viewing 1 replies (of 1 total)

The topic ‘Error when calling PHP function from theme file’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ldd-business-directory.svg)
 * [LDD Business Directory](https://wordpress.org/plugins/ldd-business-directory/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ldd-business-directory/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ldd-business-directory/)
 * [Active Topics](https://wordpress.org/support/plugin/ldd-business-directory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ldd-business-directory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ldd-business-directory/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [LDDConsulting](https://wordpress.org/support/users/suffrage/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/error-when-calling-php-function-from-theme-file/#post-4282029)
 * Status: not resolved