first|previous|random|next|last_webcomic_link

Summary:

Displays a proper link relative to the current or specified webcomic post.

Tags and base function calls:

function random_webcomic_link( $format = '%link', $link = '%label', $taxonomy = false, $terms = false, $id = false, $global = false ) {
    global $webcomic; echo $webcomic->get_relative_webcomic_link( 'random', $format, $link, $taxonomy, $terms, $id, $global );
}

function first_webcomic_link( $format = '%link', $link = '%label', $taxonomy = false, $terms = false, $id = false, $global = false ) {
    global $webcomic; echo $webcomic->get_relative_webcomic_link( 'first', $format, $link, $taxonomy, $terms, $id, $global );
}

function last_webcomic_link( $format = '%link', $link = '%label', $taxonomy = false, $terms = false, $id = false, $global = false ) {
    global $webcomic; echo $webcomic->get_relative_webcomic_link( 'last', $format, $link, $taxonomy, $terms, $id, $global );
}

function previous_webcomic_link( $format = '%link', $link = '%label', $taxonomy = false, $terms = false, $id = false, $global = false ) {
    global $webcomic; echo $webcomic->get_relative_webcomic_link( 'previous', $format, $link, $taxonomy, $terms, $id, $global );
}

function next_webcomic_link( $format = '%link', $link = '%label', $taxonomy = false, $terms = false, $id = false, $global = false ) {
    global $webcomic; echo $webcomic->get_relative_webcomic_link( 'next', $format, $link, $taxonomy, $terms, $id, $global );
}

Examples:

<nav><?php first_webcomic_link(); previous_webcomic_link(); random_webcomic_link(); next_webcomic_link(); last_webcomic_link(); ?></nav>

<?php random_webcomic_link( '%link' ,'Random Banana', 'webcomic_collection', 17 ); ?>

Arguments:

  • format (str) optional
    Format of the link.
    default: ‘%link‘; Should be ‘%link’.
  • link (str) optional
    The displayed link text.
    default: ‘%label‘; Can be ‘%label’, ‘%title’, ‘%date’, ‘%thumb-small-#’, ‘%thumb-medium-#’, ‘%thumb-large-#’, ‘%thumb-full-#’, or any other text.
  • taxonomy (str) optional
    Taxonomy to limit the results to.
    default: false; Can use any valid taxonomy. (Ex: ‘webcomic_collection’, ‘webcomic_storyline’, ‘webcomic_character’)
  • terms (int|array) optional
    The term(s) to limit the results to. Required if taxonomy is not false.
    default: false; Can use any integer or array of integers that correspond to valid term ID’s. Ex: if taxonomy = ‘webcomic_collection’ and there are three collections with the ID’s 7, 54, and 77. If you want only the last two: array( 54, 77 ).
  • id (int) optional
    Webcomic ID that links will be relative to.
    default: false; Can use any integer that corresponds to a valid webcomic ID.
  • global (bool) optional
    Whether to use URL parameters instead of the regular permalink.
    default: false; Can be true or false.
Share
Facebook Twitter Digg Stumble Delicous Email