title: Get data-slug to show up
body: <p>I don't know what I am doing wrong here but I cannot seem to display my data-slug on my site. </p>
  
  <p>I want this to show up  as I have created classes based on slugs.</p>
  
  <p><a href="https://i.stack.imgur.com/xvwED.png" rel="nofollow noreferrer">what I want to show when I do inspect element</a></p>
  
  <p>This is how I did my php-- I don't know if I had it wrong.</p>
  
  <pre><code>&lt;div class="tile-wrapper"&gt;
                          &lt;!-- TILES PER CATEGORY --&gt;
                          &lt;?php 
                              $tiles = get_posts( array(
                                  'post_type'                 =&gt; 'artise-tiles',
                                  'artise-tile-category'      =&gt; $tile_category-&gt;slug,
                                  'posts_per_page'            =&gt; 10,
                                  'offset'                    =&gt; 0,
                                  'orderby'                   =&gt; 'name',
                                  'order'                     =&gt; 'DESC'
                              ) );
  
  
                          ?&gt;
                          &lt;?php foreach( $tiles as $tile ): ?&gt;
                              &lt;?php 
                                  $tile_img = get_post_meta( $tile-&gt;ID, 'artise-tile-img', true );
  
                                  $category_terms = implode( ', ', get_terms( array(
  
                                      'taxonomy'              =&gt; 'artise-tile-category',
                                      'object_ids'            =&gt; $tile-&gt;ID,
                                      'fields'                =&gt; 'names'
                                  ) ) );
  
  
                                  $itile = array_search( $tile-&gt;ID, $curr_tile_ids );
                                  $tileExists = true;
  
                                  if( $itile === false ){
                                      $itile =  $tile_count;
                                      $tileExists = false;
                                      $curr_tile_ids []= $tile-&gt;ID;
                                  }
  
  
                              ?&gt;
                              &lt;div 
  </code></pre>