tags

UUP Dev Guide

We designed the University User Profiles plugin to be very flexible for developers.

You will need to create a new page template as part of a custom or child theme, and add the PHP below.

Basic List

Add this PHP to a custom WordPress page template to start seeing all of the different fields. To hide certain fields, change their value from ‘true‘ to ‘false‘.


$args = array(
	'tags' => array(),
	'name' => true,
	'image' => true,
	'title' => true,
	'phone1' => true,
	'phone2' => true,
	'email' => true,
	'fax' => true,
	'officeLocation' => true,
	'officeHours' => true,
	'mailingAddress' => true
	);
list_all_public($args);

Using Tags to Filter Users

If you’d like to start listing only those users with a specific tag, add those tag words into the ‘tags’ array like so. This example will only display users that have the tag “faculty”.


$args = array(
	'tags' => array('faculty'),
	'name' => true,
	'image' => true,
	'title' => true,
	'phone1' => true,
	'phone2' => true,
	'email' => true,
	'fax' => true,
	'officeLocation' => true,
	'officeHours' => true,
	'mailingAddress' => true
	);
list_all_public($args);

You can add multiple tags to create more specific groupings. This example will only display users with the tags “faculty” and “associate”.


$args = array(
	'tags' => array('faculty', 'associate'),
	'name' => true,
	'image' => true,
	'title' => true,
	'phone1' => true,
	'phone2' => true,
	'email' => true,
	'fax' => true,
	'officeLocation' => true,
	'officeHours' => true,
	'mailingAddress' => true
	);
list_all_public($args);

UC People

UC People is a plugin developed by the UITS Web & Mobile Services team. It registers a custom post type of People that appears in the left navigation of the WordPress dashboard.

In combination with new page templates available to Cornerstone-based themes, this plugin provides an easy way to organize and display people.

UC People is available to sites using Cornerstone-based themes, namely Sherman and Hale 2015.

Examples:

http://polisci.uconn.edu/people/faculty/

http://dpp.uconn.edu/faculty-research/faculty-staff/faculty/

http://provost.uconn.edu/our-team/

http://president.uconn.edu/home/our-team/

http://envpolicy.uconn.edu/directory/

http://cap.uconn.edu/staff/

Creating People

To create a person, on the left side navigation on your dashboard go to People > New Person. All fields other than the person's name are optional.

If you used the University User Profiles plugin previously, we have a guide on how to migrate from UUP to UC People. If you have a number of people entered as users, you can also perform a one-time import of users to UC People.

Groups and Tags

People can be organized in two ways, with groups and tags.  These can be managed in the dashboard by selecting 'People' and then choosing either the 'Groups' or 'Tags' options.

Groups

Groups act much like post categories, and can be nested hierarchically. For example, a group might be "Faculty" with nested subgroups of "Adjunct" and "Associate". Groups are useful when creating a page of people, as one feature there is to show people separated by their group assignments.

Tags

Tags are just like the tags used by blog posts. They can also be used to organize people, but do not have the option of being hierarchically nested. For example, a single person might be tagged with "Molecular Modeling", "Nanotechnology", and "Polymers". Later, it would then be possible to display all people in the site with the tag "Polymers".

Creating a “People Page”

One of the features of UC People is a new page template that becomes available. This page template has a lot of great tools to help filter and sort which people you want to display.

To begin, start by creating a new page. On the right, in a box labeled 'Page Attributes', set the 'Template' option to "People". You will notice that below the normal visual editor area for content, there will be a number of new form controls in a box labeled 'People Page'.

Layout

This controls the layout of how the people will be displayed. The Grid option makes a grid of people, with multiple people for each row. This is a great option if you have a lot of images, and want to focus on those.

The Table option has only one person per row, but has a lot more room for details like phone number or email address. This is a great option if you have no images, or want to focus the page more on being a resource to contact people.

Specific People

By default, a people page displays all people in the site. You can see them listed in the left column of this section. However, if you only want to display the information of a few people, you can click on those people in the left column, and they will appear in the right column. Then, the page will only display the people in the right column.

This collection of people can then be further filtered down by the Specific Groups and Specific Tags options.

To return a page to displaying all people, delete all the people in the right column.

Specific Groups & Tags

Choose one or more groups, and only people that belong to the selected group OR any other selected group will appear. This allows you to create one people page for faculty, and another for staff, for example.

Choose one or more tags, and only people that belong to the selected tag OR to any of the other selected tags will appear. This allows you to create a people page of only the people tagged with "Chemistry" for example.

If both Specific Groups and Specific Tags are in use, only people that belong to one of the groups AND have one of the specific tags will appear.

Break Into Groups

When selected, this option will display people broken out into groups ordered alphabetically on the group name. For instance, you could select "Chemistry" as the tag, enable this option, and then the people page would display a list for "Adjunct Faculty", and another for "Associate Faculty".

Information to Display

On each People page, you can choose just how much information you wish to display. Any fields left unchecked will simply be left out. Note: In order to display properly, the person's image should be at least 335px wide.

Viewing a Single Person

Once a person has been published, they are available to be linked to through menus, manual links, or a People Page.

In the Menus section, you will see a new box appear along site pages called 'People'. You will need to select this box, but can then add people into navigation menus the same way you would pages.

Ordering People

By default, people will be ordered alphabetically by first name.

This default ordering can be manipulated by altering the Order attribute of each person.

Order of a person
The Order Attribute

For example, if Abdul, Bogdan, and Carol are all set at order 0, they appear in alphabetical order by last name.

  • Carol Gordon
  • Abdul Kazeem
  • Bogdan Stanek

What's really happening behind the scenes though, is more like this:

  1. Order=0
    1. Carol Gordon
    2. Abdul Kazeem
    3. Bogdan Stanek
  2. Order=1
    1. None.

So, if Bogdan's order number changes to "1", then first the list will display all of the 0's, and then all of the 1's, each in alphabetical order.

  1. Carol Gordon [0]
  2. Abdul Kazeem [0]
  3. Bogdan Stanek [1]

If we then change Abdul to a "1", we'll get this...

  1. Carol Gordon [0]
  2. Abdul Kazeem [1]
  3. Bogdan Stanek [1]

Using this field, it's possible to alter the default ordering of people in lists.

It is important to note that altering the order for a person will effect the order in which they are displayed in any list. If you're using more than one People page, this might be an issue.

Blog Page Template

The Blog page template, part of Cornerstone, allows users to create a page that displays all posts from the site. It also allows the user to filter those posts by a specific category, author, tag, or any combination of these.

Filtering the Blog

Scroll down to the Custom Fields box. If you don't see this box, go to Screen Options on the top right of the page, and make sure the option is checked.

You can add one or all of the following fields: authors, categories, tags.

Each of these fields will accept one or more values to filter the posts by. If entering multiple values, be sure to separate them with commas.

screenshot

Accessibility

All University websites are required to be compliant with the Americans with Disabilities Act, Section 508 (specifically Subpart B, 1194.22 Web-based intranet and internet information and applications).

While Aurora’s central themes are tested and kept accessible by UITS web developers, individual webmasters are responsible for keeping the content of their pages and sites accessible as well.

Quick Tips to Keep Your Pages Accessible

Use Good Alt Tags

Alt tags for images help make a site more accessible. WordPress will use the file name of an image as the Alt tag, but this is likely not going to be good enough to pass an accessibility review. A good alt tag briefly describes the content of an image.

No Table Layouts

Layouts of rows and columns should be done with Bootstrap code, not HTML Tables. Besides being inaccessible, HTML tables will also break your pages in mobile views! Tables should only be used when the content in a cell is defined by what row and column it belongs to.

Avoid ‘Click Here’ Links

Avoid ‘Click Here’ and similar phrases for links. Instead, have the link text describe the link destination. In addition to being more accessible, it will help with your Google search rankings. For example, “For more information about our admissions process click here” could be better as “More information about our admissions process“.

Use Headings

Use headings to organize your page content. For example, this page uses Heading 2 (h2) and Heading 3 (h3) tags. “Quick Tips to Keep Your Pages Accessible” is a Heading 2, and “Use Headings” is a Heading 3. Besides bringing in a larger font and adding white space, these headings are great for accessibility. They allow impaired users to skip through the heading tags the same way you would visually scan a page for headlines. Heading 3 would be a subsection within an Heading 2 section. You can add headings to a by going to Format > Formats > Headings or by using the keyboard shortcut (Control + 2, Control + 3, etc. on Windows, Command + 2, Command + 3, etc. on Mac). Headings help your site to look great, be more accessible, and they will really help your search engine rankings.

Watch Color Contrast

Be careful with color contrast. You will be able to change the color of your page text or upload images with text. Remember that users may have forms of color blindness or weaker eyesight. In the Resources section below, there are ways to measure the contrast levels with some websites or apps. In general, don’t put red text on a green background, or yellow text on a white background. Make sure your text is clearly legible.

Contact Information

Be sure to have contact information clearly visible on the website (homepage, main navigation, or footer), providing the ability to request alternate versions of inaccessible material to viewers with disabilities.

Resources

Please note that while these tools will help issues, many aspects of web accessibility require a degree of judgement. For example, a tool can detect if you're missing an Alt tag for an image, but it won't be able to figure out if an Alt tag accurately describes the image.

Tool Description Instructions
WAVE A website that scans a single page of your site. After scanning, click the Flag icon, then change the filter to Section 508.
Web Accessibility Toolbar A browser extension for Internet Explorer that allows you to quickly run scans on any webpage.  
Accessibility Evaluation Toolbar A browser extension for Firefox that allows you to quickly run scans on any webpage.