InstaView for WordPress

Display Instagram photos and videos on your WordPress site with a responsive grid and built-in lightbox.

Tags: Instagram, photos, videos, feed, gallery, shortcode

Requires at least: 5.8

Tested up to: 6.5

Requires PHP: 7.4

Stable tag: 1.0.0

License: GPLv2 or later

License URI: https://www.gnu.org/licenses/gpl-2.0.html

InstaView lets you embed a live Instagram feed anywhere on your site using a simple shortcode. It connects to the official Instagram Graph API and caches results for fast page loads.

= Features =

* Responsive CSS Grid layout (1–6 columns, fully configurable)

* Displays both photos and videos (video thumbnails shown; play icon badge)

* Carousel album support

* Built-in accessible lightbox for full-size photo viewing

* Caption display modes: hover overlay, below image, or hidden

* Configurable cache duration (WordPress transients)

* Automatic weekly token refresh via WP-Cron

* One-click manual token refresh and cache clearing in the admin

* Short-lived → long-lived token exchange helper

* Clean uninstall — no data left behind

= Shortcode Usage =

Place `[instaview]` in any page, post, or widget.

Available attributes:

* `count` — Number of posts to show. Default: setting value (max 50).

* `columns` — Grid columns. Default: setting value (1–6).

* `type` — Filter by type: `all` (default), `image`, or `video`.

* `gap` — Gap between items in pixels. Default: `10`.

* `caption` — Caption display: `hover` (default), `below`, or `none`.

* `lightbox` — Enable lightbox: `true` (default) or `false`.

Examples:

[instaview]

[instaview count="9" columns="3"]

[instaview count="6" type="video" caption="below" lightbox="false"]

[instaview columns="4" gap="4" caption="none"]

= Setup =

1. Create a Facebook App at [developers.facebook.com](https://developers.facebook.com/).

2. Add the Instagram Basic Display product.

3. Add your Instagram account as a test user.

4. Generate a short-lived token from the API explorer.

5. Use the Exchange Token form in Settings → InstaView to convert it to a long-lived token (valid ~60 days).

6. The plugin will auto-refresh your token weekly via WP-Cron.

== Installation ==

1. Upload the `instaview` folder to `/wp-content/plugins/`.

2. Activate the plugin through the Plugins screen.

3. Go to Settings → InstaView and add your Instagram credentials.

4. Add `[instaview]` to any page or post.

== Frequently Asked Questions ==

= Do I need a business Instagram account? =

No. The Instagram Basic Display API works with personal accounts. However, it requires a Facebook App to be created.

= How long does the access token last? =

Long-lived tokens are valid for approximately 60 days. The plugin automatically refreshes the token once per week via WP-Cron, extending it continuously.

= Why aren't my posts updating? =

The feed is cached to reduce API calls. Go to Settings → InstaView → Clear Cache to force an immediate refresh.

= Can I show multiple feeds on one page? =

Yes — each `[instaview]` shortcode fetches the connected account's feed. Multiple shortcodes with different attributes can appear on the same page.

= Are video files embedded directly? =

Videos show their thumbnail in the grid with a play badge. Clicking a video opens Instagram directly (in a new tab) rather than embedding the video file, which avoids issues with expiring video URLs.

== Screenshots ==

1. Responsive 3-column photo grid with hover captions.

2. Built-in accessible lightbox for full-size viewing.

3. Admin settings page with token management tools.

== Changelog ==

= 1.0.0 =

* Initial release.

== Upgrade Notice ==

= 1.0.0 =

Initial release.