WordPress output article fixed link label: the_ permalink

WordPress template tags the_ Permalink is used to output the fixed link of the article, that is, the pseudo-static link address, which needs to be used in the main loop of the loop.

the_permalink( $post = 0 )

This function has no arguments, in fact the_ The permalink() function is equivalent to calling get_ Permalink ($post), passing the current article object to get_ Permalink() function and output the returned result.

Examples of function usage

<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>

Extended reading

the_ The permalink() function is located in: WP includes / link- template.php

Related Tags:

  • permalink_ anchor()
  • get_ permalink()
  • post_ permalink()
  • permalink_ single_ rss()
Related Article
WordPress comment summary tag: comment_excerpt

WordPress template tags comment_ Excerpt is used to output the summary of comments. The default output is 20 characters. It Read more

WordPress comment time tag: comment_time

WordPress template tags comment_ Time is used to output the publishing time of the current comment, which is the same Read more

WordPress RSS format comment author name tag: comment_author_rss

WordPress template tags comment_ author_ RSS is used to output the comment author name in RSS format, which has no Read more

WordPress comment form title tags: comment_form_title

WordPress template tags comment_ form_ Title is used to output the title of a comment form, which is usually used Read more

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image