Title: Issue when setting $query post_type to array value
Last modified: August 30, 2016

---

# Issue when setting $query post_type to array value

 *  [kwisatz](https://wordpress.org/support/users/kwisatz/)
 * (@kwisatz)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/issue-when-setting-query-post_type-to-array-value/)
 * When setting post_type to an array of values, for instance inside the pre_get_posts()
   filter, as described here [https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts#Include_Custom_Post_Types_in_Search_Results](https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts#Include_Custom_Post_Types_in_Search_Results)
 * Some of the function inside the breadcrumbs plugin will attempt to work with 
   an Array object instead of a string:
 *     ```
       Notice: Array to string conversion in /app/src/wp-includes/formatting.php on line 961
   
       Notice: Undefined index: bpost_Array_archive_display in /app/src/wp-content/plugins/breadcrumb-navxt/class.bcn_breadcrumb_trail.php on line 731
   
       Notice: Array to string conversion in /app/src/wp-includes/formatting.php on line 961
   
       Notice: Trying to get property of non-object in /app/src/wp-content/plugins/breadcrumb-navxt/class.bcn_breadcrumb_trail.php on line 639
   
       Notice: Array to string conversion in /app/src/wp-includes/formatting.php on line 961
   
       Notice: Undefined index: apost_Array_root in /app/src/wp-content/plugins/breadcrumb-navxt/class.bcn_breadcrumb_trail.php on line 778
       ```
   
 * [https://wordpress.org/plugins/breadcrumb-navxt/](https://wordpress.org/plugins/breadcrumb-navxt/)

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

 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/issue-when-setting-query-post_type-to-array-value/#post-6775817)
 * Thanks for reporting this, I plan on fixing this for the next release and I am
   tracking it in this GitHub issue: [https://github.com/mtekk/Breadcrumb-NavXT/issues/126](https://github.com/mtekk/Breadcrumb-NavXT/issues/126)
 *  Thread Starter [kwisatz](https://wordpress.org/support/users/kwisatz/)
 * (@kwisatz)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/issue-when-setting-query-post_type-to-array-value/#post-6775818)
 * Perfect, thanks!
 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/issue-when-setting-query-post_type-to-array-value/#post-6775852)
 * I’ve implemented a fix for this, it is now available on the GitHub master version
   of Breadcrumb NavXT. Please test it out and let me know if it behaves as you 
   expect.
 *  Thread Starter [kwisatz](https://wordpress.org/support/users/kwisatz/)
 * (@kwisatz)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/issue-when-setting-query-post_type-to-array-value/#post-6775880)
 * I’ll see to testing this asap.

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

The topic ‘Issue when setting $query post_type to array value’ is closed to new 
replies.

 * ![](https://ps.w.org/breadcrumb-navxt/assets/icon.svg?rev=1927103)
 * [Breadcrumb NavXT](https://wordpress.org/plugins/breadcrumb-navxt/)
 * [Support Threads](https://wordpress.org/support/plugin/breadcrumb-navxt/)
 * [Active Topics](https://wordpress.org/support/plugin/breadcrumb-navxt/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/breadcrumb-navxt/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/breadcrumb-navxt/reviews/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [post_type](https://wordpress.org/support/topic-tag/post_type/)
 * [wp_query](https://wordpress.org/support/topic-tag/wp_query/)

 * 4 replies
 * 2 participants
 * Last reply from: [kwisatz](https://wordpress.org/support/users/kwisatz/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/issue-when-setting-query-post_type-to-array-value/#post-6775880)
 * Status: not resolved