Ecommerce Shopify WordPress Discussion

WordPress page-template foreach json not working

It seems there has been a PHP update that I don't know about In the page-template folder of the theme (made by me custom) there is a file to put a custom template to put six cards whose data I take from a json file through a Foreach loop. The Foreach loop worked before but now it doesn't work. Maybe it's a PHP update that I'm not aware of. Replacing the cards I put six identical texts You can see this here The text above is entered directly into the wordpress editor This is the code: <?php /* Template Name: Cards Principal */ ?> <?php get_post(); ?> <?php get_header(); ?> <hr> <h2 class="pageTitle"><strong><?php the_title(); ?></strong></h2> <hr> <?php the_content(); ?> <?php $miJSON = file_get_contents('https://2000peliculassigloxx.com/wp-content/uploads/json/principal.json'); $datos = json_decode($miJSON, true); echo '<div class="container-fluid">'; echo '<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-4">'; echo '<strong>TARJETA EN MANTENIMIENTO</strong>'; echo '<strong>TARJETA EN MANTENIMIENTO</strong>'; echo '<strong>TARJETA EN MANTENIMIENTO</strong>'; echo '<strong>TARJETA EN MANTENIMIENTO</strong>'; echo '<strong>TARJETA EN MANTENIMIENTO</strong>'; echo '<strong>TARJETA EN MANTENIMIENTO</strong>'; foreach($datos as $dato){ echo '<a href="'.$dato['Enlace'].'" target="_blank">'; echo '<div class="card text-center">'; echo '<img src="'.$dato['url_imagen'].'" class="card-img-top" alt="'.$dato['Título'].'">'; echo '<div class="card-body">'; echo '<h3 class="card-title">'.$dato['Título'].'</h3>'; echo '<p class="card-text">'.$dato['Texto'].'</p>'; echo '</div>'; echo '</div>'; echo '</a>'; } echo '</div>'; echo '</div>'; ?> <?php get_footer(); ?> Please I need all six cards to be seen
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.