Title: Change to the renderDirectionsArray
Last modified: August 22, 2016

---

# Change to the renderDirectionsArray

 *  [gpyrgiot](https://wordpress.org/support/users/gpyrgiot/)
 * (@gpyrgiot)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/renderdirectionsarray/)
 * Hi guys,
 * just wanted to suggest a change to the renderDirectionsArray function to render
   the directions one after the other one in the structured data instead of a block.
   Here is the modified code that I added the **itemprop=\”recipeInstructions\”**
   in the <$tag>. The code now read like:
 *     ```
       public function renderDirectionsArray(array $array, $tag = 'li')
       	{
       		$value = 1;
   
       		foreach ($array as $item)
       		{
       			if (substr($item, 0, 1) === ":")
       			{
       				echo "<$tag class=\"kb-section-header\" itemprop=\"recipeInstructions\">" . substr($item, 1) . "</$tag>\r\n";
       			}
       			else
       			{
       				echo "<$tag itemprop=\"recipeInstructions\" value=\"$value\">" . $item . "</$tag>\r\n";
       				$value += 1;
       			}
       		}
       	}
       ```
   
 * Just thought I should let you know. May you can considered i to the next upgrade.
 * [https://wordpress.org/plugins/kitchenbug/](https://wordpress.org/plugins/kitchenbug/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [kitchenbug](https://wordpress.org/support/users/kitchenbug/)
 * (@kitchenbug)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/renderdirectionsarray/#post-5190742)
 * Hi User,
 * We can certainly make the change. I’ll add it to the next version list.
 * Kind Regards,
 * Gilad

Viewing 1 replies (of 1 total)

The topic ‘Change to the renderDirectionsArray’ is closed to new replies.

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

 * 1 reply
 * 2 participants
 * Last reply from: [kitchenbug](https://wordpress.org/support/users/kitchenbug/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/renderdirectionsarray/#post-5190742)
 * Status: not resolved