1. Home
  2. Docs
  3. Extension: Shortcodes
  4. [series_toc]

[series_toc]

shortcode: [series_toc]

parameters:

  • orderby  – options are: name|series_id|count|slug  // what series data point you want the series toc sorted on.  default is “series_id”
  • order – options are: ascending|descending // how you want the series toc sorted (based on the orderby selection. Default is descending.
  • hide_empty  – options are: yes|no // Do you want series with no assigned posts to be excluded from the toc? Default is yes.
  • exclude – a comma delimited list of series ids for series you DON’T want included in the series toc.  If you have a value in the “include” parameter, the exclude parameter is ignored. Default is none.
  • include – a comma delimited list of series ids for series you DO want included in the series toc. Default is All (auto/none)
  • number – the number of series you want displayed in the series toc (based on the sorted parameters, orderby and order). Default is all.
  • offset – if you want to offset the series pulled from the database from the sorted list you can indicate so using  this parameter (useful if you are doing custom paging for the series toc using shortcodes. Default is no offset.
  • search – if you want to only display series that match a search term (agains the series name) you can use this parameter. Default is no search.

usage:
The series table of contents output via this shortcode will have its layout controlled by the “Series Table of Contents Listings” template found in the series options page (in a future version of Organize Series Shortcodes, we will provide the ability to control the output via custom template right within the shortcode [similar to how the series meta and series nav shortcodes work])

The easiest way to use this shortcode is via the Series TOC button found in the “visual” editor.  However, you can manually add the paramters for the series toc shortcode using the following format (as an example this includes an actual shortcode)

[series_toc orderby="name" order="ASC" hide_empty="false" exclude="702" include="701, 703, 777, 702" number="2" offset="2" search="series"]

In the above example, the series table of contents that will be rendered will be ordered by the series names in ascending order (alphabetically).  Any series with no posts assigned WILL be shown.  The exclude parameter will be ignored because we have a value for the include parameter.  The series displayed will be those with the series ids: 777 and 702 because they are in the include parameter, the number displayed is 2 and the offset is 2.  777 and 702 happen to be the id’s for the series with the titles: “a series on oranges” and “a series on apples”.  Since both titles have the word “series” in the title then they match the search parameter.

Was this article helpful to you? Yes No

How can we help?