UAMS News Block
Add the UAMS News block to dynamically display the latest posts from one or more categories.
Format
Set the Format dropdown to select how the posts should be displayed in the block.
Available options:
- Headlines — Display a bulleted list of linked post titles.
- Excerpts — Display a vertical list of posts with featured images on the left, text content and link on the right.
- Cards — Display tiles for four posts with a vertical arrangement of their featured image, text content and link. The arrangement of these tiles will shift as the width of the viewport changes.
- Full — Display the entirety of first post in the defined category, including featured image and its caption.
- Grid — Display one post on the left with a featured image while displaying two posts on the right with smaller post titles. The arrangement of these posts will shift as the width of the viewport changes.
- Side-by-Side Image & Text — Display one post with its featured image on the left half of the block and its text content and link on the right half of the block. On larger viewport widths, the middle 42-69% of the image width will be visible (presuming the image is at a 16:9 aspect ratio). On smaller viewport widths, the layout will shift to having the featured image above the other content, and the image will display at a 16:9 aspect ratio.
Examples of these formats can be seen at the bottom of this article. The order of the examples reflects to the order of the list above.
Section Title
Enter a value in the Section Title field to define the heading that will be placed above the posts in this block. Note that not all Format options will display the section title on the page.
Capitalize the text in the heading according to the AP Style rules for composition titles.
Hide Section Title
Toggle the Hide Section Title input on if you want to hide the block’s heading on the page.
While you have the option to hide the block’s heading, it is rarely (if ever) recommended. Leaving it visible gives the user/reader a jumping-in point on your page. If you think you have a good reason to hide the heading, reach out to the web team before doing so.
Every instance of this block must have a heading, even if it is visually hidden. The heading is still used for accessibility and SEO purposes. This heading indicates what the following items have in common.
Category
Add a category slug or a string of category slugs to the Category input to find posts that are in any of the categories.
To find the slug for a category, go to the site’s dashboard, then Posts, then Categories. There should be a table with a list of categories. In that table is a column labeled Slug. Copy the slug value for the desired category and add that to the block’s Category input.
To add more than one category slug to the input, separate the slugs with a comma and a space (e.g., food, clothing
).
Adding more than one category slug will expand the list rather than narrow it. If you defined Category value as food, clothing
, the posts displayed would be from either the category with a slug of food
or the category with a slug of clothing
.
Count
Define how many posts should be displayed by adding a whole number to the Category input.
Note that some Format options have a predefined number of posts that will be displayed.
Offset
To configure the block to not display a certain number of the most recent posts, enter the value as a whole number in the Offset input.
This may be useful when combining two UAMS News blocks on a page, using the first block to display the one most recent post using the Side-by-Side Image & Text option in the Format input, then using a second block to display the posts older than that one by adding an Offset value of 1
and setting the Format value as Cards.
Background Color
See Backgrounds of UAMS Blocks for information on selecting a background color.
Hide Images
Some Format options will display the featured image for each post. If there is no featured image, a UAMS logo will be used as a replacement. Toggle on the Hide Images setting to suppress all images for this block.
Note that not all Format options will have the option to hide images.
Hide Author
Some Format options will display the author for each post. Toggle on the Hide Author setting to suppress the display of authors for this block.
Note that not all Format options will have the option to hide authors.
Hide Date
Some Format options will display the publish date for each post. Toggle on the Hide Date setting to suppress the display of publish dates for this block.
Note that not all Format options will have the option to hide publish dates.
Advanced Settings
Expand the Advanced accordion panel (near the bottom of the block) to reveal addition settings.
Including Local Posts
By default, the block only looks for posts on news.uams.edu. To also include posts from the site where the block is used, toggle on the Include Local option.
There is not currently an option only include local posts. The best option for that is to create categories on the site whose slugs do not match the slugs of categories on news.uams.edu.
Advanced Category
Add single category ID or a string of category IDs to the Advanced Category input to find posts that are in any of the categories.
To find the ID for a category, go to the site’s dashboard, then Posts, then Categories. There should be a table with a list of categories. Click the name of the desired category. The URL of this page should contain a URL parameter named tag_ID (e.g., .../wp-admin/term.php?taxonomy=category&tag_ID=123&post_type=post...
). Copy the number value after tag_ID=
but before &
(e.g., 123
in the example above).
To add more than one category ID to the input, separate the IDs with a comma and a space (e.g., 123, 456
).
Adding more than one category ID will expand the list rather than narrow it. If you defined Category value as 123, 456
, the posts displayed would be from either the category with an ID of 123
or the category with an ID of 456
.
To find posts that are in one category but not another (e.g., display posts that are in the Food category and are not also in the Red Things category), add a minus sign before the category ID that should be excluded (e.g., 123, -456
)