Support

Account

Home Forums Add-ons Options Page Options Page Repeater breaking footer template

Solved

Options Page Repeater breaking footer template

  • Using the new Options page creator in ACF PRO, I created an options page and named it Footer. I created a repeater for social icons and added the following code to the footer template:

    <div class="social_icons">

    <?php
    if( have_rows('social_icons', 'option') ):

    while ( have_rows('social_icons', 'option') ) : the_row(); ?>

    " title="<?php the_sub_field('name'); ?>"> <?php the_sub_field('font_awesome_code'); ?>

    <?ph endwhile;
    else :
    endif;
    ?>

    </div><!-- .social_icons -->

    This code breaks the footer. Can someone please help me get to the bottom of this?

  •         <div class="social_icons">
    
            <?php
            if( have_rows('social_icons', 'option') ):
    
                while ( have_rows('social_icons', 'option') ) : the_row(); ?>
    
                 <a href="<?php the_sub_field('link'); ?>" title="<?php the_sub_field('name'); ?>"> <?php the_sub_field('font_awesome_code'); ?> </a>
    
             <?ph   endwhile;
            else :
            endif;
            ?>
    
            </div><!-- .social_icons -->
  • Nevermind… Just before the elsewhile I had <?ph instead of <?php

    My bad. This code now works

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.