Skip to content

Instantly share code, notes, and snippets.

@AndrewSepic
Created December 9, 2020 20:53
Show Gist options
  • Save AndrewSepic/d2b39c60ffcd36c57b84e257b90a40ee to your computer and use it in GitHub Desktop.
Save AndrewSepic/d2b39c60ffcd36c57b84e257b90a40ee to your computer and use it in GitHub Desktop.
<?php
/**
* Template part for displaying the instagram Feed. Dependent upon Smashballoon's instagram feed pro
*
* @link https://www.advancedcustomfields.com/resources/flexible-content/
*
* @package Prana
*/
// settings
$index = $template_args['index'];
// content
$my_account = get_field( 'instagram_username');
?>
<div id="<?php echo 'module-' . $index; ?>" class="module module-instagram <?php echo 'module-' . $index; ?> no-image">
<section class="instagram-info">
<div class="container">
<a href="https://instagram.com/<?php echo $my_account; ?>" target="_blank" class="instagram-name">
<img src="<?php echo get_template_directory_uri(); ?>/img/instagram-green-icon.svg" alt="instagram">
@<?php echo $my_account; ?>
</a>
</div>
</section>
<section class="instagram-pics">
<?php echo do_shortcode( '[instagram-feed user=' . $my_account. ']' ); ?>
</section>
<section class="instagram-pics-slider visible-xs visible-sm">
</section>
</div><!-- /.module-full-width-cta -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment