﻿# ProFeedWP Shortcode Guide

Use the `[profeedwp]` shortcode when the block editor is unavailable, disabled, or not the right fit for the page builder workflow. The shortcode works in the Classic Editor, Avada text/code/shortcode elements, widgets, and templates that run `do_shortcode`.

## Basic Shortcode

The only required attribute is `company_url`.

```text
[profeedwp company_url="https://www.linkedin.com/company/ibm/"]
```

Use the public LinkedIn company page URL. The plugin normalizes supported LinkedIn company URLs before loading the feed.

## Free Examples

Simple feed:

```text
[profeedwp company_url="https://www.linkedin.com/company/ibm/"]
```

Three-column grid using the Minimal theme:

```text
[profeedwp company_url="https://www.linkedin.com/company/ibm/" posts="6" theme="minimal" columns="3"]
```

Social theme with a widescreen image ratio:

```text
[profeedwp company_url="https://www.linkedin.com/company/ibm/" posts="6" theme="social" image_aspect_ratio="16/9"]
```

Hide images:

```text
[profeedwp company_url="https://www.linkedin.com/company/ibm/" images="false"]
```

List layout:

```text
[profeedwp company_url="https://www.linkedin.com/company/ibm/" posts="6" layout="list" list_media_left="true"]
```

## Pro Examples

ProFeed Pro adds additional layouts, more themes, faster refreshes, and advanced styling controls.

Carousel layout:

```text
[profeedwp company_url="https://www.linkedin.com/company/ibm/" posts="9" layout="carousel" theme="social" columns="3"]
```

Show only posts with images:

```text
[profeedwp company_url="https://www.linkedin.com/company/ibm/" only_images="true"]
```

Custom styling:

```text
[profeedwp company_url="https://www.linkedin.com/company/ibm/" posts="6" theme="modern" columns="3" card_background_color="#ffffff" text_color="#111827" border_radius="12" grid_gap="24" image_aspect_ratio="16/9"]
```

## Refreshing the Feed

The shortcode loads the same frontend script and REST proxy as the block. Feed data is cached by the plugin and refreshes automatically when the cache expires.

In the free plugin, feeds refresh automatically about every 12 hours. ProFeed Pro can use `refresh_interval` to tell the frontend how often to check for fresh data.

```text
[profeedwp company_url="https://www.linkedin.com/company/ibm/" refresh_interval="3600"]
```

Administrators can also refresh a feed from WordPress Admin > Settings > ProFeed.

## Attribute Reference

| Attribute | Alias | Values | Default | Notes |
| --- | --- | --- | --- | --- |
| `company_url` | `company`, `url` | LinkedIn company URL | none | Required. |
| `posts` | `posts_to_show` | Number | `6` | Number of posts to request. Free is capped at 6. |
| `layout` | none | `grid`, `list`, `carousel`, `masonry` | `grid` | Feed layout. Free supports grid and list. |
| `theme` | none | `default`, `dark`, `minimal`, `corporate`, `barebone`, `vibrant`, `gallery`, `modern`, `linkedin`, `social` | `default` | Feed theme. Free supports default, minimal, barebone, and social. |
| `columns` | none | `1` to `6` | `3` | Main responsive column count. |
| `columns_sm` | none | `1` to `3` | `1` | Small-screen column count. |
| `columns_lg` | none | `1` to `6` | `3` | Large-screen column count. |
| `images` | `show_images` | `true`, `false` | `true` | Show or hide post images. |
| `date` | `show_date` | `true`, `false` | `true` | Show or hide post dates. |
| `text` | `show_text` | `true`, `false` | `true` | Show or hide post text. |
| `only_images` | `show_only_with_images` | `true`, `false` | `false` | Pro-only. Only show posts that have images. |
| `text_truncation_type` | none | `words`, `characters` | `words` | How post text should be shortened. |
| `text_limit` | `text_truncation_limit` | Number | `30` | Text limit when a post has an image. |
| `text_limit_no_image` | `text_truncation_limit_no_image` | Number | `80` | Text limit when a post has no image. |
| `refresh_interval` | none | Seconds | `3600` | Pro-only. Free refreshes about every 12 hours. |
| `show_like_count` | `likes` | `true`, `false` | `false` | Pro-only. Shows like counts when available in the feed response. |
| `show_comment_count` | `comments` | `true`, `false` | `false` | Pro-only. Shows comment counts when available in the feed response. |
| `carousel_show_scrollbar` | none | `true`, `false` | `true` | Pro-only carousel scrollbar option. |
| `carousel_draggable` | none | `true`, `false` | `true` | Pro-only carousel drag option. |
| `carousel_hide_overflow` | none | `true`, `false` | `true` | Pro-only carousel overflow option. |
| `list_media_left` | none | `true`, `false` | `false` | Places media on the left in list layout. |
| `list_media_left_cover` | none | `true`, `false` | `false` | Makes left media cover its side in list layout. |
| `card_background_color` | `custom_card_background_color` | CSS color | empty | Pro-only card background color. |
| `card_background_gradient` | `custom_card_background_gradient` | CSS gradient | empty | Pro-only card background gradient. |
| `text_color` | `custom_text_color` | CSS color | empty | Pro-only text color. |
| `hover_background_color` | `custom_hover_background_color` | CSS color | empty | Pro-only hover background color. |
| `hover_text_color` | `custom_hover_text_color` | CSS color | empty | Pro-only hover text color. |
| `border_radius` | `custom_border_radius` | Number | empty | Pro-only border radius in pixels. |
| `font_size` | `custom_font_size` | Number | empty | Pro-only font size in pixels. |
| `font_size_slug` | none | WordPress font size slug | empty | Pro-only saved font size slug data. |
| `image_aspect_ratio` | none | `auto`, `1`, `4/3`, `16/9`, `3/2`, `2/1` | `3/2` | Controls image shape. |
| `grid_gap` | none | `0` to `60` | `20` | Pro-only grid gap in pixels. |
| `align` | none | `wide`, `full` | empty | Adds WordPress alignment classes. |
| `class` | `class_name` | CSS class | empty | Adds one custom class to the feed wrapper. |

Boolean attributes accept `true`, `false`, `1`, `0`, `yes`, `no`, `on`, and `off`.

## PHP Template Usage

In a PHP template, render the shortcode with `do_shortcode`.

```php
<?php echo do_shortcode('[profeedwp company_url="https://www.linkedin.com/company/ibm/" posts="3"]'); ?>
```

Only use this in templates where shortcodes are expected and where the company URL is trusted or escaped before being inserted.

## Troubleshooting

If nothing appears, confirm that `company_url` is present and points to a LinkedIn company page.

If the shortcode appears as plain text, place it in an editor area or builder element that executes WordPress shortcodes. In Avada, use a Text Block, Code Block, or Shortcode element.

If the feed does not update immediately, remember that feed data is cached. Wait for the cache interval or use the settings page refresh action.
