Changing and inserting lists

This site uses several lists that bring in a group of posts on to a page. For example, a list of recent news or a list of forthcoming events.

These lists are set up for this site and should be doing the right jobs on the appropriate pages already. They are created with a List Widget. All the lists operate within the main column of the website and access to the code is best done in the HTML editor.

NOTE: The information at the bottom shows you what is going on with List widget code, but most of the presentation (how it looks) of these lists has been permanently decided by the designer. You probably won’t ever need to create a list from scratch – but the info below may still be useful if you accidentally break something!

Lists on this site

  • Home page uses a list of 4 recent news items in a special styled column with thumbnail pictures, plus another special style for a list of events (just displaying a thumbnail image and key text) at the bottom of the page.
  • News page has a basic list of recent news items that is split across several pages and displayed as excerpts with a thumbnail link to the side
  • Productions page shows a list of forthcoming shows with a large featured image at the top and a summary (specified in the excerpt box of each post)
  • Events page shows MGA events as an excerpt with a large featured image at the top of each.
  • Staff page uses a special list displaying the staff posts in expandable entries.

The List Widget

The list is created by a line of code within the main content window that starts with ‘

Published 25/6/22   7:30PM

The Wedding Singer

Published 22/6/22   7:30PM

The Sweet Science of Bruising

Published 18/6/22   7:30PM

Rise Up

Published 18/6/22   2:30PM

The Lights

Published 14/6/22   1:11PM

Join the Queendom!

’. All of the parameters should be typed in with a space between each.

Calling the right list

The first parameter inside the call specifies the category of posts the list is showing. Write ‘cat=20’ (or whatever the number is). If you don’t write this number, you won’t get a list. To find the cat number, go to the posts or staff posts section in the Admin area and click ‘categories’ or ‘staffpost type’ from the menu. Hovering over the one you want, you will see an ID number in their URL web address.

Other parameters

There are several other details needed to display the list you want. Type a space between each entry.

  • Order – default (ie: if you haven’t specified it) is descending from most recent to least recent (‘order=DESC’ if you want to put it in). This is used for news. Type ‘order=ASC’ to flip the order. This is used for lists of forthcoming events.
  • Status – WordPress understands status as being whether the date of the post has happened or not. Normally it will not display anything that has not happened yet. Add ‘status=future’ if you are using posts with future dates – lists of events and productions.
  • Heading – A heading with style <h2> tags will be included at the top of the list. Type ‘heading=Whatever_the_heading’ – important to note the underscores instead of spaces and any fancy punctuation characters need a backslash ‘\’ before.

Format options

You can also add in, alongside the above, various instructions for how the list will appear. (These are all connected to the design that has been set up for the site.)

  • Number – How many posts are shown, default is 5. Type ‘show_posts=’ followed by the amount. To show all posts in your category, type ‘-1’. Use ‘1’ for a post that updates to the next in the list, for example the next upcoming event. This is a list and not an insert post!
  • Paginate – if the list is very long, ‘paginate=true’ will split it across pages (see the News page). Default just shows an ever-increasing list (‘false’).

List styles

There are also options for how the list is presented.

  • Type – lists are view in 3 styles, add ‘type=’ followed by the word for the style you want: ‘titles’ (default – just the post titles in a straight list), ‘excerpts’ (the title and part of the text – see below for details), and ‘full’ (the whole post including all the text, images and title)
  • Format – Type ‘format=’ followed by a letter that represents certain info NOT to be displayed: ‘d’ suppresses publication date and ‘t’ surpresses time (eg: on the staff list); ‘r’ removes links from the titles and thumbnails (eg: on the staff list)
  • Style – There are several different stylings for lists that have been set up by the designer. Add ‘style=’ followed by ‘thumblist’ for a list that shows thumbnail images to the side of each item, ‘largelist’ for a list that shows the feature image for the post as a large picture at the top of each item, ‘stafflist’ for use with the staff list only and ‘homenews’ on the homepage.
  • Pictures – For use in conjuction with the above styles, you may need to specify the picture size (taken from the versions available in the site design). Type ‘pic_size=’ and add ‘thumbnail’ for the thumblist, homenews and stafflist or ‘full’ for the largelist.

An excerpt is either a chunk of text (usually a summary) put into the ‘excerpt’ window below the main post content in the editing window (we do this for shows) or up to where a <!--more--> tag has been inserted into the main content, or if neither of these exist, a default amount of words taken from the first paragraph. Most of the news items in lists show as last option. For either the automatic excerpt or the specified excerpt using the ‘more’ tag, a ‘Read more’ link appears at the end.