Title: PHP Warning: Undefined array key
Last modified: February 5, 2026

---

# PHP Warning: Undefined array key

 *  [sky4est](https://wordpress.org/support/users/sky4est/)
 * (@sky4est)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-28/)
 * Hello I’m getting an Undefined array key error on this last line:
 *     ```wp-block-code
       //Place the breadcrumb in the trail, uses the constructor to set the title, template, and type, get a pointer to it in return    $breadcrumb = $this->add(new bcn_breadcrumb(            $term->name,            $this->opt['Htax_' . $term->taxonomy . '_template_no_anchor'],
       ```
   
 * The exact error is:
 * PHP Warning: Undefined array key “Htax_attachment_tag_template_no_anchor” in /
   nas/content/live/ccahalliance/wp-content/plugins/breadcrumb-navxt/class.bcn_breadcrumb_trail.
   php on line 583
 * I presume it is one of my custom post types behaving badly or something similar,
   but is there a way to use array_key_exists() since this may also be related to
   a PHP update?

Viewing 1 replies (of 1 total)

 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-28/#post-18814630)
 * It is likely you are registering the custom taxonomy too late for Breadcrumb 
   NavXT to properly setup default settings for said taxonomy. If you visit the 
   Breadcrumb NavXT settings page, you likely will get a warning at the top of the
   page regarding the taxonomy being registered too late (after the 9000 level of`
   init`, which is quite late). The recommendation is to register the taxonomy earlier(
   can still use `init`, but it needs to be at some level of value less than 9000).

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warning-undefined-array-key-28%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](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/)

 * 1 reply
 * 2 participants
 * Last reply from: [John Havlik](https://wordpress.org/support/users/mtekk/)
 * Last activity: [3 months, 2 weeks ago](https://wordpress.org/support/topic/php-warning-undefined-array-key-28/#post-18814630)
 * Status: not resolved