• Resolved pandabrand

    (@pandabrand)


    I am trying to use the Ajax Load More ACF extension specifically in a Roots Sage starter template which blade templates. My code snippet in my template looks like this:

    @php
    
    echo do_shortcode('[ajax_load_more container_type="div" acf="true" acf_field_type="flexible" acf_field_name="westex_blocks" post_type="in-depth"]')
    
    @endphp

    When doing so I get a error from symfony

    Undefined variable: page

    in /Volumes/Hobo/Local/westex/app/public/wp-content/plugins/ajax-load-more-for-acf/functions.php (line 166)

    1.                 if ($row_counter < $options['posts_per_page'] && $count >= $start) {
    2.                     $row_counter++;
    3.                     // Set ALM Variables
    4.                     $alm_found_posts = $total;
    5.                     $alm_page = $page + 1;
    6.                     $alm_item = $count + 1;
    7.                     $alm_current = $row_counter + 1;
    8.                     // Repeater Template
    9.                     if($options['theme_repeater'] != 'null' && has_action('alm_get_theme_repeater')){
    HandleExceptions->handleError(8, 'Undefined variable: page', '/Volumes/Hobo/Local/westex/app/public/wp-content/plugins/ajax-load-more-for-acf/functions.php', 166, array('field_name' => 'westex_blocks', 'id' => '14705', 'options' => array('page' => '0', 'posts_per_page' => '5', 'offset' => '0', 'max_pages' => 99999, 'repeater' => 'default', 'theme_repeater' => 'null', 'preloaded' => false), 'total' => 53, 'content' => '', 'data' => '', 'postcount' => 0, 'alm_found_posts' => 53, 'per_page' => 1, 'start' => 0, 'end' => 5, 'count' => 0, 'row_counter' => 1))
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘page variable missing in Blade template’ is closed to new replies.