WordPress V2.xTemplate Tag Reference Guide as of Version 2.x
Presented by:
Link Tags
'Edit Post' Linkedit_post_link();
Displays a link to edit the current post, if a user is logged in and allowed to edit the post.
<?php edit_post_link('link', 'before', 'after'); ?>
link
The link text. Defaults to 'Edit This'.
<?php edit_post_link('Edit', 'before', 'after'); ?>
String
before
Text to put before the link text. There is no default.
<?php edit_post_link('link', '»', 'after'); ?>
String
after
Text to put after the link text. There is no default.
<?php edit_post_link('link', 'before', '«'); ?>
String
'Edit Comment' Linkedit_comment_link();
Displays a link to edit the current comment, if the user is logged in and allowed to edit the comment.
<?php edit_comment_link('link', 'before', 'after'); ?>
link
The link text. Defaults to 'Edit This'.
<?php edit_post_link('Edit', 'before', 'after'); ?>
String
before
Text to put before the link text. There is no default.
<?php edit_post_link('link', '»', 'after'); ?>
String
after
Text to put after the link text. There is no default.
<?php edit_post_link('link', 'before', '«'); ?>
String
Page Linkswp_page_links();
Displays page-links for paginated posts.
<?php wp_page_links('arguments'); ?>
before
Text to put before all the links. Defaults to <p>Pages:
<?php wp_page_links('before=<div>'); ?>
String
after
Text to put after all the links. Defaults to </p>.
<?php wp_page_links('after=</div>'); ?>
String
next_or_number
Indicates whether page numbers should be used.
<?php wp_page_links('next_or_number=next'); ?>
number
next
nextpagelink
Text for link to next page. Defaults to Next page.
<?php wp_page_links('nextpagelink=Next'); ?>
String
previouspagelink
Text for link to previous page. Defaults to Previous page.
<?php wp_page_links('previouspagelink=Previous'); ?>
String
pagelink
Format string for page numbers. % in the string will be replaced with the number, so Page % would generate "Page 1", "Page 2", etc. Defaults to %.
<?php wp_page_links('pagelink=[%]'); ?>
String
more_file
Page the links should point to. Defaults to the current page.
<?php wp_page_links('more_file=more.php'); ?>
String
Yearly Archive URLget_year_link();
Returns the yearly archive URL to a specific year for use in PHP. It does NOT display the URL. If year is set to '', the tag returns the URL for the current year's archive.
<?php get_year_link('year'); ?>
year
The year for the archive. Use '' to assign current year.
<?php get_year_link('2003'); ?>
Integer
Monthly Archive URLget_month_link();
Returns the monthly archive URL to a specific year and month for use in PHP. It does NOT display the URL. If year and month parameters are set to '', the tag returns the URL for the current month's archive.
<?php get_month_link('year','month'); ?>
year
The year for the archive. Use '' to assign current year.
<?php get_month_link('2003','month'); ?>
Integer
month
The month for the archive. Use '' to assign current month.
<?php get_month_link('year','10'); ?>
Integer
Daily Archive URLget_day_link();
Returns the monthly archive URL to a specific year and month for use in PHP. It does NOT display the URL. If year and month parameters are set to '', the tag returns the URL for the current month's archive.
<?php get_day_link('year','month','day'); ?>
year
The year for the archive. Use '' to assign current year.
<?php get_day_link('2003','month','day'); ?>
Integer
month
The month for the archive. Use '' to assign current month.
<?php get_day_link('year','10','day'); ?>
Integer
day
The day for the archive. Use '' to assign current day.
<?php get_day_link('year','month','23'); ?>
Integer
Previous Post Linksnext_posts_link();
This creates a link to the previous posts. Yes, it says "next posts," but it's named that just to confuse you.
<?php next_posts_link('Label', 'Max number of pages (default 0)'); ?>
No Parameters.