• Resolved ColinJSwinney

    (@colinjswinney)


    Hello,

    Great plug-in! I’m trying to implement a change in the code and I’m not sure how to begin.

    Basically, I have a CPT called “Apps”, and we use ACF to enter in an iTunes App ID and pull in JSON data. It looks something like this…

    $appEntryID = get_field('app_entry_id_number');
      $appEntryInfo = 'https://itunes.apple.com/lookup?id='. $appEntryID .'';
      $appEntryData = json_decode(file_get_contents($appEntryInfo), true);
      $appEntryTitle = $appEntryData['results'][0]['trackName'];
      $appEntryURL = $appEntryData['results'][0]['trackViewUrl'];
      $appEntryIcon512 = $appEntryData['results'][0]['artworkUrl512'];

    The variable $appEntryIcon512 spits out a url that I would like to insert into Nelio. Can you point me in the right direction as to what hooks or filters I would need to adjust? This CPT does not use the_content() FWIW…

    Thanks for any ideas!!

    https://www.ads-software.com/plugins/external-featured-image/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Aguilera

    (@davilera)

    Hi!

    I guess you’ll need to modify the following function from our plugin (defined in includes/nelio-efi-main.php): nelioefi_get_thumbnail_src. This function returns the URL of the external featured image (if any; false otherwise).

    I suppose that you can change the code of that function an returns the value of $appEntryIcon512

    Thread Starter ColinJSwinney

    (@colinjswinney)

    Thank you for the reply, I will give this a try!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Grab URL From JSON Array’ is closed to new replies.