Testimonial

Advanced Custom Fields

If working with ACF, you will want to utilize the following fields:

Fields:

  • Textarea: testimonial_quote
  • Text: testimonial_author

Markup

HTML

<figure class="Testimonial" itemscope itemtype="http://schema.org/Review">
    <blockquote itemprop="reviewBody">This is the greatest compnoent library out there... 10up is even awesomer for inspiring it!</blockquote>
    <footer>
        <cite class="TestimonialAuthor" itemprop="author">- Wes Cole</cite>
    </footer>
</figure>

PHP

<figure class="Testimonial" itemscope itemtype="http://schema.org/Review">
    <blockquote itemprop="reviewBody"><?php the_field( 'testimonial_quote' ); ?></blockquote>
    <footer>
        <cite class="TestimonialAuthor" itemprop="author">- <?php the_field( 'testimonial_author' ); ?></cite>
    </footer>
</figure>

Twig

<figure class="Testimonial" itemscope itemtype="http://schema.org/Review">
    <blockquote itemprop="reviewBody">{{testimonial.get_field('testimonial_quote')}}</blockquote>
    <footer>
        <cite class="TestimonialAuthor" itemprop="author">- {{testimonial.get_field('testimonial_author')}}</cite>
    </footer>
</figure>