Appendix A. Template Tags

Table of Contents

first_comic — display a link to the first comic
previous_comic — display a link to the previous comic
next_comic — display a link to the next comic
last_comic — display a link to the last comic
random_comic_link — display a like to a random comic.
first_comic_url — get the URL of the first comic
previous_comic_url — get the URL of the previous comic
next_comic_url — get the URL of the next comic
last_comic_url — get the URL of the last comic
random_comic_url — get the URL of a random comic
show_comic — display the current comic file(s)
show_comic_for_date — show a particular date's comics
show_previous_comics — display a series of comics that precede the current comic
show_next_comics — display a series of comics that follow the current comic
recent_comics — display a list of the most recent comic posts
recent_noncomics — display a list of the most recent non-comic blog posts
comic_archive_list — display a list of all comics in the archive
comic_archive_table — display a table of all comics in the archive
comic_calendar — display a calendar of comics
has_transcript — determine whether comic has a transcript
transcript_toggler — display a link that toggles display of comic transcript
the_transcript — display the comic's transcript
storyline_dropdown — display an HTML drop-down menu containing all the storylines in the archive
storyline_list — display a list of storylines
the_story — display the name of the current story
storyline_start_url — display the URL of the first comic in the current storyline
storyline_end_url — display the URL of the last comic in the current storyline
story_part — display the current part of the current storyline
story_parts — display the number of comics in the current story
is_comic — determine whether the current post is a comic

While the example themes included with stripShow are designed to be easy to customize, it's likely that many people will want to create their own themes or adapt third-party themes to use stripShow features. Any WordPress theme can be converted into a stripShow theme through the addition of template tags.

These tags are PHP commands; they should be placed into your template files in the form <?php template_tag()?>. For example, to use the first_comic tag, you'd insert <?php first_comic()?>.

Many template tags can use additional arguments, which change the behavior of the tags. All of these arguments are optional; the tags themselves are designed to be used without them for simplicity's sake. If you do choose to modify a tag's behavior with arguments, remember that PHP requires that arguments be entered in the exact order they are listed. If you wish to omit an argument but include an argument listed after it, use a set of quotes as a placeholder, like so:

<?php last_comic('Last Comic','',TRUE); ?>

Each tag is shown in action, with example usage coupled with the expected output from each example. The output may be broken into multiple lines to fit the printed page, but in real-world use, most tags produce output without any line breaks.