Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Sounds like a repeater template issue.
    Can you post it here?

    Thread Starter Kokomo

    (@kokomoweb)

    Thanks for the quick help!

    here’s what the previous dev put in there:

    <?php global $i;if($i%3==0) { ?>
    <div class=”post-blocks-row”>
    <div class=”container”>
    <?php } ?>
    <div class=”post-block col-sm-4″>

    <div <?php post_class(); ?> id=”post-<?php the_ID(); ?>”>
    <div class=”post-thumbnail”>
    “>
    <?php the_post_thumbnail(‘full’); ?>

    <h3 class=”post-title” >“><?php the_title(); ?></h3>
    </div>
    <div class=”post-excerpt”>
    <?php the_excerpt(); ?>
    </div>
    <!– <div class=”btn btn-lire”>“>Lire</div> –>
    </div>
    </div>
    <?php $i++;
    if($i%3==0) { // if counter is multiple of 5, put an closing div ?>
    </div>
    </div>
    <?php } ?>

    Plugin Author Darren Cooney

    (@dcooney)

    The issue is most the following conditional:

    <?php global $i;if($i%3==0) { ?>
    <div class="post-blocks-row">
    <div class="container">
    <?php } ?>
    AND
    <?php $i++;
    if($i%3==0) { // if counter is multiple of 5, put an closing div ?>
    </div>
    </div>
    <?php } ?>

    Unfortunately the way the plugin is currently built, that is not going to be possible and will likely cause issues like you are having.

    From the FAQs
    Always open and close your templates with an HTML element. In some rare cases data may not be displayed if not wrapped in HTML.
    e.g. <li> </li> or <div> </div>

    Thread Starter Kokomo

    (@kokomoweb)

    I tried removing all conditional statements and i’m still getting the same problem, the button will stop working after one batch:

    <div class="post-blocks-row">
          	<div class="container">
          		<div class="post-block col-sm-4">
    
          			<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
          				<div class="post-thumbnail">
          					<a href="<?php the_permalink(); ?>">
          						<?php the_post_thumbnail('full'); ?>
          					</a>
          					<h3 class="post-title" ><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
          				</div>
          				<div class="post-excerpt">
          					<?php  the_excerpt(); ?>
          				</div>
          			</div>
          		</div>
          	</div>
    Plugin Author Darren Cooney

    (@dcooney)

    You are missing a closing </div>

    Thread Starter Kokomo

    (@kokomoweb)

    You were right. It works now, thank-you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Button only works once’ is closed to new replies.