About

Title is the main label on a piece of information. In WP the term is mainly used to label a whole html page, a post, a widget or an attachment.

Title is the main label on a piece of information. In WP the term is mainly used to label a whole html page, a post, a widget or an attachment.

  1. The title of a whole html page page is wrapped in <title> tags. Since WP 4.1 using add_theme_support( 'title-tag' ); for this is recommended.
  2. The title of a single post is included in a theme with the_title.
  3. The title is the only standardized item within an widget. Its html properties are set when register_sidebar is set. The actual title is set by the widget itself. If the widget title is set in the standard way, it is possible to filter it.
  4. Attachments (such as images to a post) are a special type of post and hence have titles to. These are set during the media upload process and be retrieved with $attachment->post_title, where $attachment is the attachment object.
history | excerpt history