Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

the_title_attribute()

3 tags 1 category

the_title_attribute() — Sanitizes the current title when retrieving or displaying. Works like the_title(), except the parameters can be in a string or an array. See the function for what can be override in the $args parameter. The title before it is displayed will have the tags stripped and esc_attr() before it is passed to the user or displayed. The default as with the_title(), is to display the title.

Inputs: $args (string|array): Title attribute arguments. Optional. Field $before (string): Markup to prepend to the title. Default empty. Field $after (string): Markup to append to the title. Default empty. Field $echo (bool): Whether to echo or return the title. Default true for echo. Field $post (WP_Post): Current post object to retrieve the title for.

Returns string|null|void: The title attribute when ‘echo’ is false, null when the title is empty. Nothing otherwise.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…