Table of Contents Template

In this guide, we focus on the customization of the Series Table of Contents Template.

The Series Table of Contents is a page on your blog that lists all the series you've written. The output of this page is controlled by three things.

  • “Series Table of Contents URL” in the¬†“Display” section¬†of the Series Options Page. This setting is what you want to be the location of the series table of contents page.
  • “seriestoc.php” – this is the default file that Organize Series will load when the series table of contents page is requested.
  • “Series Table of Contents Template” in the “Templates” section of the Series Options Page.

Like other templates found on the series options page you can use HTML, CSS, and tokens to control how each series listing will appear on the series table of contents page.

Series Toc
Series Toc

For those who want to get more customized with the display of the Series Table of Contents Template here are some template tags (functions) you can use. Remember all of these template tags are found in the “orgSeries-template-tags.php” file which contains inline documentation.

Template Tags for Series Table of Contents:

  • wp_serieslist_display_code() – This will output a formatted output of the indicated series and does not have to be in the WordPress Loop. It accepts two parameters: the series id of the series to be listed (required), and what page is calling this function (not required). Remember this function does not output a list of all the series you've written, it only prints the output for the given series. The output is controlled by the “series table of contents template” as explained in this post.
  • wp_serieslist_display() – This is the function you will use if you want to output the entire list of non-empty series you've written. All it does is query the database for the series you've written that contain posts and then calls wp_serieslist_display_code() for each series in the list. Again, this function also does not need to be called from within the WordPress Loop.

Professional publishing plugins for WordPress! Get PublishPress