Title: itemprop=&#8221;itemListElement&#8221;
Last modified: December 11, 2018

---

# itemprop=”itemListElement”

 *  [JamesKoussertari](https://wordpress.org/support/users/jameskoussertari/)
 * (@jameskoussertari)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/itempropitemlistelement/)
 * Hi,
 * I want to be able to add the following breadcrumb markup:
 *     ```
       <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
       <a itemprop="item" typeof="WebPage" href="%link%" class="%type%">
       <span itemprop="name">Home</span></a>
       <meta itemprop="position" content="%position%">
       </li>
       ```
   
 * However, when I try to save it, it strips out all the attributes in the li tag
   and says “Settings did not change, nothing to save.”
 * Without this the Google Structured Data Testing Tool shows errors.
 * Please help.
 * Thanks

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

 *  Thread Starter [JamesKoussertari](https://wordpress.org/support/users/jameskoussertari/)
 * (@jameskoussertari)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/itempropitemlistelement/#post-10974165)
 * .
 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/itempropitemlistelement/#post-10976618)
 * The default settings for Breadcrumb NavXT are schema.org BreadcrumbList compliant,
   you shouldn’t need to modify them. That said, if you want to use `li` wrappers,
   it is probably better to use `bcn_display_list` rather than `bcn_display`.
 * The reason the setting won’t save is likely due to something in the li element
   not being whitelisted when it is run through `wp_kses`. You can add support for
   this element and various attributes by writing a filter for the `bcn_allowed_html`
   hook. See [https://mtekk.us/archives/guides/how-to-add-li-and-other-tags-to-breadcrumb-templates/](https://mtekk.us/archives/guides/how-to-add-li-and-other-tags-to-breadcrumb-templates/)
   for an example of how to do this.
 *  Thread Starter [JamesKoussertari](https://wordpress.org/support/users/jameskoussertari/)
 * (@jameskoussertari)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/itempropitemlistelement/#post-10977796)
 * Hi, Thanks for your reply.
 * Perhaps I’m doing something wrong, but your plugin does not include either of
   these lines of code in the output by default:
 * **RDFa**
 *     ```
       <ol vocab="http://schema.org/" typeof="BreadcrumbList">
         <li property="itemListElement" typeof="ListItem">
       ```
   
 * I’m having to wrap `bcn_display()` in an `<ol>` with the schema code like so:
 *     ```
       <ol class="breadcrumbs mb50" vocab="http://schema.org/" typeof="BreadcrumbList">
          <?php bcn_display($return = false, $linked = true, $reverse = false, $force = false); ?>
       </ol>
       ```
   
 * But Google is still saying this:
    **A value for the itemListElement field is 
   required.**
 * So I guess if I could add something to stop stripping out the `<li>` attributes
   that would solve all my problems. I just don’t know exactly how I would go about
   adding a filter to stop stripping out the following code:
 * `<li property="itemListElement" typeof="ListItem">`
 * Can you help me with this please?
 * Thanks
 *  Thread Starter [JamesKoussertari](https://wordpress.org/support/users/jameskoussertari/)
 * (@jameskoussertari)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/itempropitemlistelement/#post-10984457)
 * Don’t worry this sorted it, like you previously suggested:
 *     ```
       /* Allow extra tags in <li> */
       function scratch_bcn_allowed_html($allowed_html){
           $allowed_html['li'] = array(
       		'property' => true,
       		'typeof' => true
   
           );
           return $allowed_html;
       }
       add_filter('bcn_allowed_html', 'scratch_bcn_allowed_html');
       ```
   
 * **I am then using this for all linked breadcrumbs:**
 *     ```
       <li property="itemListElement" typeof="ListItem">
       <a property="item" typeof="WebPage" href="%link%" class="%type%">
       <span property="name">Home</span>
       </a>
       <meta property="position" content="%position%">
       </li>
       ```
   
 * **And this for all unlinked:**
 *     ```
       <li>
       <span>%htitle%</span>
       <meta content="%position%">
       </li>
       ```
   
 * Thanks
    -  This reply was modified 7 years, 6 months ago by [JamesKoussertari](https://wordpress.org/support/users/jameskoussertari/).

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

The topic ‘itemprop=”itemListElement”’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [JamesKoussertari](https://wordpress.org/support/users/jameskoussertari/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/itempropitemlistelement/#post-10984457)
 * Status: not resolved