Title: Problem with do_shortcode and [bps_directory]
Last modified: August 28, 2019

---

# Problem with do_shortcode and [bps_directory]

 *  Resolved [enaeld](https://wordpress.org/support/users/enaeld/)
 * (@enaeld)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/problem-with-do_shortcode-and-bps_directory/)
 * Hi I hope you’re fine.
    I have a problem with the plugin. When I place :
 * **<?php echo do_shortcode(‘[bps_directory]’); ?>**
 * in a template, here is the error returned :
 * **Warning: Cannot modify header information – headers already sent by (output
   started at C:\wamp64\www\xalpha\wp-includes\class.wp-styles.php:242) in C:\wamp64\
   www\xalpha\wp-content\plugins\bp-profile-search\bps-directory.php on line 129**
 * I do not know what to do about this mistake. I have already tried with other 
   themes and I get the same error. When I only place the shortcode in the WordPress
   editor it works. But I really need to use do_shortcode in my template to be able
   to handle some conditions with php…
 * Thanks in advance,
    have a great day

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

 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/problem-with-do_shortcode-and-bps_directory/#post-11884930)
 * Hi enaeld,
 * Sorry for the late reply…
 * Unfortunately `[bps_directory]` is not a standard shortcode, and won’t work if
   called with `do_shortcode()`.
 * If you wish, you could try BP Profile Search 4.9.8, where `[bps_directory]` was
   a real shortcode. That had to be changed in 5.0 to make it work with _BP Nouveau_,
   and to fix some remaining bugs with _BP Legacy_.
 *  Thread Starter [enaeld](https://wordpress.org/support/users/enaeld/)
 * (@enaeld)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/problem-with-do_shortcode-and-bps_directory/#post-11886988)
 * Hi Andrea,
 * Thank you very much for your answer, I’ll think about it !!

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

The topic ‘Problem with do_shortcode and [bps_directory]’ is closed to new replies.

 * ![](https://ps.w.org/bp-profile-search/assets/icon.svg?rev=1568973)
 * [BP Profile Search](https://wordpress.org/plugins/bp-profile-search/)
 * [Support Threads](https://wordpress.org/support/plugin/bp-profile-search/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-profile-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-profile-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-profile-search/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [enaeld](https://wordpress.org/support/users/enaeld/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/problem-with-do_shortcode-and-bps_directory/#post-11886988)
 * Status: resolved