Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. <article @php post_class() @endphp>
  2.   <section class="playlist">
  3.     <!-- Playlist Info -->
  4.     <header>
  5.       @php
  6.         $volume = get_field('volume');
  7.         $date = get_field('date');
  8.         $client = get_field('client');
  9.         $tag = get_field('tag');
  10.       @endphp
  11.       <h1 class="entry-title">
  12.         {{ get_the_title() }}
  13.       </h1>
  14.       @if($client)
  15.         <h4>Client: {{ $client->name }}</h4>
  16.       @endif
  17.       @if($tag)
  18.         <h4>Tag: {{ $tag->name }}</h4>
  19.       @endif
  20.       <h4>Volume: {{ $volume }}</h4>
  21.       <h4>Date: {{ $date }}</h4>
  22.     </header>
  23.  
  24.     <!-- Generated Playlist -->
  25.     @if (have_rows('playlist'))
  26.       <ol>
  27.         @while(have_rows('playlist')) @php(the_row())
  28.           @php($audio = get_sub_field('audio'))
  29.           <!-- Tracks -->
  30.           <li data-name="{{$audio['title']}}" data-artist="" data-url="{{$audio['url']}}" data-art="{{$audio['icon']}}">
  31.             <h2>{{$audio['title']}}</h2>
  32.             <audio controls>
  33.               <source src="{{$audio['url']}}">
  34.             </audio>
  35.           </li>
  36.         @endwhile
  37.       </ol>
  38.     @endif
  39.   </section>
  40. </article>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement