Workaround for new Instagram JSON
-
I have had the same issues because Instagram has updated their JSON. For anybody willing to hack the code, it’s quite simple if you know where to look:
In version 1.4.1, file instaram_slider.php:
around line 993:
-> REPLACE
$entry_data = isset( $results['user']['media']['nodes'] ) ? $results['user']['media']['nodes'] : array();
-> WITH
$entry_data = isset($results['graphql']['user']['edge_owner_to_timeline_media']['edges']) ? $results['graphql']['user']['edge_owner_to_timeline_media']['edges'] : [];
AND JUST BELOW
-> REPLACEforeach ( $entry_data as $current => $result ) { if ( 'hashtag' == $search ) { $result = $result['node'];
-> WITH
foreach ( $entry_data as $current => $result ) { $result = $result['node']; if ( 'hashtag' == $search ) {
This made it show the images again…
To clean the cache, execute this command in your DB after a backup!!
DELETE FROMwp_options
WHEREoption_name
LIKE (‘%\_transient\_%’)
- The topic ‘Workaround for new Instagram JSON’ is closed to new replies.