In your template, you insert a transcript through the use of template tags. The conditional tag has_transcript can be used to ensure that the transcript toggler is only shown if the post itself has a transcript. Transcript tags should only be used inside WordPress's loop.
Example 6.2. Transcript PHP
<?php
if(has_transcript()) {
transcript_toggler();
the_transcript();
}
?>
This code consists of three parts:
|
This conditional tag tells stripShow only to display any of the following if there actually is a transcript for this post. |
|
|
This code generates a link that, when clicked, shows or hides the transcript code. By default, the transcript starts out hidden. See transcript_toggler. |
|
|
This code generates the transcript itself, as an HTML table. See transcript_toggler. |