Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

ACF Gallery and searching by text: Illegal string offset (Woocommerce, WOOF)

$
0
0

Replies: 0

Hi,

I have problem with using ACF Gallery with Woocomerce Product Filtering. When I am searching product by its attribute everything is ok, ACF Gallery of colors under text is displayed:

Colors displayed

Problem occurs when I try to search by text (Woocommerce Product Filtering), I wrote the name of the product:

Problem with displaying ACF Gallery

Colors under text are not displaying, I am getting:
Illegal string offset ‘url’ in woocommerce/content-product.php

My code there is:

$images = get_field('colors');

if( $images ) { ?>
        <?php
		for ($i = 0;$i < count($images) && $i < 38;$i++) { ?>

		<img src="<?php echo $images[$i]['sizes']['thumbnail']; ?>" alt="<?php echo $images[$i]['alt']?>" />
   <?php } ?>
<?php } ?>
  • This topic was modified 3 minutes ago by  bienio.

Viewing all articles
Browse latest Browse all 67836

Trending Articles