[{{fullurl:{{{page}}}|diff=prev&oldid={{{oldid}}}}} {{{page}}}]

Creates an external link to a Wikipedia diff page.

{{wp-diff
| page  = 
| oldid = 
| diff  = 
| title = 
}}
  • page — Full title of page to be diffed
  • oldid — "oldid" field of diff URL. ID of edit to diff
  • diff — "diff" field of diff URL (optional)
    • Use prev or omit to compare oldid to immediate previous version
    • Use next to compare oldid to immediate next version
    • Use ID of newer edit to compare to oldid
  • title — Link text (optional, omit to use page title as link text)
Diff type Code Result
Previous {{wp-diff | page=Template:wp-diff | oldid=65748127 | title=Diff #1}} Diff #1
Next {{wp-diff | page=Template:wp-diff | oldid=65748127 | diff=next | title=Diff #2}} Diff #2
Newer {{wp-diff | page=Template:wp-diff | oldid=65748127 | diff=65754364 | title=Diff #3}} Diff #3