Adding shortcodes to your pages, posts and articles

There are 3 different modes that you can display your links in. These are:

    1. Table / List format
    2. Feed (single column)
    3. Featured (up to 3 column)

Each mode of display has many ways to configure the actual list of links displayed based on the following attributes:

        • Program Area
        • Tag
        • Format
        • A featured Link or not
        • Max number of results to show

Some shortcode examples are given below. We suggest you play around with the shortcodes to see what the results are. Due to the configurability built into the design of the LEANWI Link Manager this is the best way to check whether your shortcode implementation is best for your particular scenario.

Where are the ids coming from?

To use these shortcodes you will typically need to know the ids for the attributes you wish to filter the links by. These can be found in the first column of the main display table in the Program Area, Formats and Tags section of your LEANWI Link Manager plugin.

Table / List format shortcode examples

The shortcode link_manager_list is expecting attributes based on the following code snippet:

$atts = shortcode_atts([
        ‘area_id’ => ”,               // Optional, example: area_id=”1,2″
        ‘tag_id’ => ”,                 // Optional, example: tag_id=”1,2″
        ‘format_id’ => ”,          // Optional, example: format_id=”1,2″
        ‘max_listings’ => ‘0’,   // Optional, Default to 0 = no limit
    ], $atts, ‘link_manager_list’);
 

The simplest form for displaying links in a table is:

[link_manager_list]

This will display a list of all of the links in the Link Manager system.

Here is an example adding specific program area IDs to only display links associated with those specific Program Areas.

[link_manager_list area_id=”1,4,6″]

And another which will only display up to 10 links, i.e. the 10 most recently created links, for the same query as above.

[link_manager_list area_id=”1,4,6″ max_listings=”10″]

Here is an example adding specific program area IDs and formats to only display links associated with those specific Program Areas and Formats (for say Webinars and Instructional videos perhaps).

[link_manager_list area_id=”1,4,6″ format_id=”2,4″]

We can also add tags to our initial filter:

[link_manager_list area_id=”1,4,6″ format_id=”2,4″ tag_id=”7,8,9″]

Any combination of area_id, format_id and tag_id may be used making your display of links very configurable depending on what context the list of links is for.

Feed format shortcode examples

The shortcode link_manager_feed is expecting attributes based on the following code snippet:

$atts = shortcode_atts([
        ‘area_id’ => ”,               // Optional, example: area_id=”1,2″
        ‘tag_id’ => ”,                 // Optional, example: tag_id=”1,2″
        ‘format_id’ => ”,          // Optional, example: format_id=”1,2″
        ‘featured’  => ”,           // Optional, true, or false
        ‘max_listings’ => ‘0’,   // Optional, Default to 0 = no limit
    ], $atts, ‘link_manager_feed’);
 
You can see that the attributes are much the same as for link_manager_list except there is an additional “featured” attribute. This attribute allows you to display only featured links (true) or only non-featured links (false) if it is used.

The simplest form for displaying links as a feed is:

[link_manager_feed]

This will display all of the links in the Link Manager system as a single column feed down the page.

To display all of our featured links in the feed mode we would write:

[link_manager_feed featured=”true”]

This will display all of the featured links in the Link Manager system as a single column feed down the page.

Otherwise, the attributes perform exactly the same as for link_manager_list…

Here is an example adding specific program area IDs to only display links associated with those specific Program Areas.

[link_manager_feed area_id=”1,4,6″]

And another which will only display up to 10 links, i.e. the 10 most recently created links, for the same query as above.

[link_manager_feed area_id=”1,4,6″ max_listings=”10″]

Here is an example adding specific program area IDs and formats to only display links associated with those specific Program Areas and Formats (for say Webinars and Instructional videos perhaps).

[link_manager_feed area_id=”1,4,6″ format_id=”2,4″]

We can also add tags to our initial filter:

[link_manager_feed area_id=”1,4,6″ format_id=”2,4″ tag_id=”7,8,9″]

Any combination of area_id, format_id and tag_id may be used making your display of links very configurable depending on what context the list of links is for.

Featured format shortcode examples

The shortcode link_manager_feed is expecting attributes based on the following code snippet:

$atts = shortcode_atts([
        ‘area_id’ => ”,               // Optional, example: area_id=”1,2″
        ‘tag_id’ => ”,                 // Optional, example: tag_id=”1,2″
        ‘format_id’ => ”,          // Optional, example: format_id=”1,2″
    ], $atts, ‘link_manager_featured’);
 
You can see that we have a slightly shortened list of attributes that we can pass. This is because all list items are assumed to be featured, and we will automatically display up to 3 items in the 3 columns if available.

The simplest form for displaying links as featured is:

[link_manager_featured]

This will display the most recent (up to) 3 featured items that exist in your LEANWI Link Manager system in regard to their creation date attribute that is set when the link is created.

Here is an example adding specific program area IDs to only display links associated with those specific Program Areas.

[link_manager_featured area_id=”1,4,6″]

Here is an example adding specific program area IDs and formats to only display links associated with those specific Program Areas and Formats (for say Webinars and Instructional videos perhaps).

[link_manager_featured area_id=”1,4,6″ format_id=”2,4″]

We can also add tags to our initial filter:

[link_manager_fetured area_id=”1,4,6″ format_id=”2,4″ tag_id=”7,8,9″]

Any combination of area_id, format_id and tag_id may be used making your display of links very configurable depending on what context the list of links is for.

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /srv/users/demo/apps/training-librarieswin-org/public/wp-includes/formatting.php on line 4715