• Resolved elwwww

    (@elwwww)


    Hello,

    I have the following loop on a page:

    <?php
    $args = array(
    ‘type’ => ‘ondernemers’, /* custom post type name */
    ‘parent’ => ”,
    ‘orderby’ => ‘id’,
    ‘order’ => ‘ASC’,
    ‘hide_empty’ => 1,
    ‘hierarchical’ => 1,
    ‘taxonomy’ => ‘ondernemers_cat’

    );

    $taxonomy = ‘ondernemers_cat’;
    $cats = get_terms($taxonomy);

    // $cats = get_categories($args);
    foreach ($cats as $cat) {
    $cat_id= $cat->term_id;
    $cat_name= $cat->name;
    echo ‘<button class=”button button-‘ . $cat->slug . ‘” data-filter=”‘ . $cat->slug . ‘”><div class=”button-img”>slug . ‘.png” />’ . $cat->name . ‘</button>’;
    }
    ;?>

    The last <button> doesnt close and the rest of the website gets wrapped inside the last <button> element of the loop. This only happens on the webp cached version.

    I’m using the advanced configuration with pre-compression and minification disabled (same thing happens with them enabled).

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Div in php loop doesn’t close in webp version’ is closed to new replies.