Series Options Page: Series Table of Contents Template
So far in the this series I've been writing about the Series Options page and focusing on some of the things you can do there to customize the output of series related information on your blog. In this post of the series I'm going to 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 (that contain posts). The output of this page is controlled by three things.
- "Series Table of Contents URL" in the Automation Settings 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. The default layout in this file should work with most theme setups but of course it won't work with all. In some cases, this file will have to be modified to match your theme structure (i.e by looking at your themes index.php or archive.php file). I'll be writing a post later in this series to go into more detail with this.
- "Series Table of Contents Template" in the Template Tag Options 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. For example, this...
Will result in something like this:
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 if you are too impatient for me to write a detailed explanation in this series!
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