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

    (@dcooney)

    Hi, sorry I’m not sure what you are trying to do…
    Do you mean use the Ajax Load More repeater on another page?

    Thread Starter glennyboy

    (@glennyboy)

    Hi
    I want to add an Ajax Load More Repeater Template directly into a template. currently it seems the only way the repeater can be added is via the short code, rather than php?

    For example the following does not work:-

    <?php echo do_shortcode(“[ajax_load_more repeater=”repeater3″ post_type=”my_cpt” max_pages=”none” posts_per_page=”9″ button_label=”More” transition=”fade”]”); ?>

    It doesn’t output / responds with a php error.

    Thanks
    Glennyboy

    Plugin Author Darren Cooney

    (@dcooney)

    I’ll need a url so I can see what is happening.

    Thread Starter glennyboy

    (@glennyboy)

    Hi
    That’s the problem nothing is happening as the short code is not outputting as a short code echo via code like the above. Nothing displays so there’s nothing I can show you.
    It works fine as just a short code within WordPress editor etc, but I need it to run directly in a template file and that’s why I’m asking if there is any way to embed the Ajax repeater directly via php?
    Thanks
    Glennyboy

    Plugin Author Darren Cooney

    (@dcooney)

    Right, i believe the issue is your use of quotes.
    try this:
    <?php echo do_shortcode('[ajax_load_more repeater="repeater3" post_type="my_cpt" max_pages="none" posts_per_page="9" button_label="More" transition="fade"]'); ?>

    Thread Starter glennyboy

    (@glennyboy)

    Great that worked, but regretably I din’t solve my issue. I need to add a variable to the loop:-

    $slideNumber = 1;

    so this works:-

    <?php
    $slideNumber = 1;
    while ( $loop->have_posts() ) : $loop->the_post(); ?>

    – is that possible?

    Thanks
    Glennyboy

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Add Repeater to Template’ is closed to new replies.