Navigation Template

One feature in PublishPress Series is a Navigation strip that gets displayed with posts that are part of a series containing links to the next and previous posts in the series. This just provides another way for users to click through to other posts in the series besides the series table of contents.

On the Series Options page is a template for controlling how the series navigation strip is displayed:

Navigation Template
Navigation Template

Notice that like the other templates on the options page you control the output by inserting various tokens, text, and HTML markup.

You can automatically insert the series navigation strip into your blog by using the %postcontent% token. In this image above, the %postcontent% token is before the rest of the template telling the plugin that you want the Series Navigation Strip to show up after the post-content.

Removing the %postcontent% token would keep your post content from displaying. If you don't want the series navigation strip to show up just  remove everything except for the %postcontent% token. Another caveat of %postcontent% is that it only controls automatic insertion into the full post page views of your blog theme (on is_single();pages).

The default tokens, %previous_post% and %next_post% are replaced by the title of the previous and next posts in the series respectively. However if you'd rather use something other than the post titles (maybe to keep the text from overflowing when there are long titles like in my example) then use the %previous_post_custom% and %next_post_custom% tokens. You can insert those in your series navigation template and then choose what text you want to show up in the “Custom next post navigation text” and “Custom previous post navigation text” fields.

What about template tags/functions?

Here are the details for customizing the template files. More detailed docs are in the orgSeries-template-tags.php file):

  • wp_series_nav() – gets the links for previous OR next posts in a series. This function takes the arguments: series_ID, whether your calling the next post or previous post, whether you want custom text or not and whether you want the output displayed. This comes in handy for people who want to put the %next_post% and previous post links in totally different locations on the page.
  • wp_assemble_series_nav() – this calls the series navigation template and replaces all the %tokens% with the related series information.

Professional publishing plugins for WordPress! Get PublishPress