1. Home
  2. Docs
  3. Series Options Page
  4. Navigation Template

Navigation Template

If you haven’t yet you’ll want to read about  automation settingstokens, and Templates before reading any further.  That will give you some needed background.

One of the  features included with Organize 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:

The output of the above looks like this:

Notice that like the other templates on the options page you control the output by inserting various %tokens%, text, and (x)html markup. Once again, you can automatically insert the series navigation strip into your blog by using the %postcontent% token. In this particular example 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. Remember, 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 BUT 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, <code>%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) that’s what the %previous_post_custom% and %next_post_custom% tokens are for. 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?

Ahh yes, for the customizers here’s the goods (don’t forget more detail 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 basically calls the series navigation template and replaces all the %tokens% with the related series information. Note if you use this AND also have the %postcontent% token in the series navigation template you’ll have some weird stuff happen…
Was this article helpful to you? Yes No

How can we help?