UConn Today Plugin

This document is intended to explain and demonstrate how to use the UCToday plugin available on Aurora and University Communications websites.

Add Articles to Your Website

There are two ways to add UConn Today articles to your website. You can use:

UConn Today Widget
From within your page builder, select the "Add Widget" button at the top of the page and then select the "UConn Today Widget."

Screenshot 2023-06-26 at 1.44.05 PM.png 6.56 KB View full-size Download

Screenshot 2023-06-26 at 1.42.23 PM.png 112 KB View full-size Download

 

When using the widget, you may select one or more categories. There is also an AND/OR selector. Changing the selector will change how posts are fetched from UConn Today.

For instance, in the screenshot below, the categories for alumni AND cahnr are selected. This means that posts will need to have both categories. Adding more categories to the AND setting will narrow the search for posts.

Screenshot 2023-07-13 at 9.55.39 AM.png 184 KB View full-size Download

 

In this example, the widget is configured to display posts from arts OR athletics. This means that posts will have either of the two categories but not necessarily both. Adding more categories to the OR setting will broaden the search for posts.

Screenshot 2023-07-13 at 9.56.17 AM.png 103 KB View full-size Download

 

Shortcode
You can insert shortcode into your visual editor, just like you would add a line of text. You can access the plugin to utilize the shortcode builder or combine attributes to write your own shortcode. Details are below, and here are a couple of examples (DO NOT COPY AND PASTE EXAMPLES):

  • Display 4 articles from CLAS that are specifically about undergraduate research:

    • [UC-Today category="clas+research+undergraduate"]
  • Display 6 articles in 3 columns from SFA with pictures, excerpts, and "Read More" buttons:

    • [UC-Today number-of-posts="6" columns="3" category="sfa" excerpts="true" read-more="Read More..."]
  • Display 3 articles in 3 columns from ENGR about innovation:

    • [UC-Today category="engr+innovation" number-of-posts="3" columns="3"]

Find the Plugin

The UCToday plugin is located in your website's WordPress admin dashboard under Settings -> UConn Today Plugin. Options within the plugin include:

  • Cache duration setting

  • Cache clearing tool

  • Style override setting

  • Shortcode builder

Screenshot 2023-06-22 at 11.17.49 AM.png 241 KB View full-size Download

Creating Your Shortcode

The type, number, and display of articles fetched by the UCToday plugin is determined by a series of attributes passed to the shortcode.  

Note: Attributes can be combined to create different results.

Here is a list of the available attributes:

Fetching UCToday Articles by: 

Category

Most users will want to fetch stories by category. The following options are available:

  • Fetch stories from a single category

  • Fetch stories which must include a set of categories. For example, getting stories about arts AND alumni

    • In order for stories to be displayed, they must have both categories assigned. While you can put together as many AND statements as you like, each additional one will narrow the range of stories returned

  • Fetch stories that have one of a set of categories. For example getting stories about arts OR alumni

    • This will attempt to fetch stories which have either of these categories, but not necessarily both. Each additional slug in this case will return a broader range of stories

Note: While there is no limit to the number of categories that can be used, the number of articles returned will typically be reduced as the categories increase and get more specific.

Article (a.k.a. Post Slugs)

This setting allows people to fetch a specific group of articles. 

Note: Only the stories specified will be displayed and the results will not update.

Keyword Search

This setting is not recommended, but we have included for complete documentation. It allows you to fetch articles as if you were searching UConn Today from the search page. It returns articles based on keyword search of titles, post excerpts, and post content. Results are likely to be extremely random.


Additional Controls/Settings

Offset

The default for the plugin is to return the most recent set of stories. However, you can configure the plugin to offset the results by a number. The offset is zero-indexed meaning you must subtract one from the number at which you want to start getting stories. For instance, to get stories starting from the 5th most recent story.

Number of Posts

This attribute allows you to select the number of posts to attempt to retrieve. The default is 4 and does not need to be set. The example below will attempt to get 6 stories.

Columns

The number of columns in which to display posts. The default is 4 and does not need to be set. This, combined with the number of posts, will determine the shape of the grid for the display.

Pictures

This attribute determines if featured images should or should not be displayed. The default is true and does not need to be set

Show Excerpt

This attribute determines if the post excerpt should be displayed. The default is false and does not need to be set

Show Date

This attribute determines if the post date should be displayed. The default is false and does not need to be set

Read More Text

This attribute will place a "read more" link below the articles. The text will be the same for each article and will include a link back to that article

Â