Closed benaltair closed 3 years ago
Hi @benaltair
Can I assume you removed it from that page because it seems to render ok (apart from there's no reference the plugin).
Any chance you could provide error logs as well? I have a suspicion that shorthand
PHP tags aren't enabled. If you're using shared hosting, you may not have the ability to turn this on. If the issue relates to shorthand
tags I'd suggest using the following piece of code instead:
<div class="instagram-feed">
<?php foreach($instagram->feed()->limit(8)->get() as $image): ?>
<a href="<?php print $image->link() ?>" target="_blank" class="insta-item">
<img src="<?php print $image->thumbnail() ?>" alt="<?php print $image->caption() ?>">
</a>
<?php endforeach; ?>
</div>
I should start off by saying that I'm definitely novice at PHP.
I put the following code in my footer within a snippet
gram.php
:When I insert the snippet to
footer.php
, the page breaks after<div class="instagram-feed">
with nothing else afterwards. I'm running PHP v. 5.4, so that's not a problem right?Do I need any specific PHP modules added?
It might be worth noting that I'm on shared hosting for this demo. You can see the broken site here: https://new.benaltair.com/
I'll also paste the entire
footer.php
here: