Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789

Warning: foreach() argument must be of type array|object, string given in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 794

Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789

Warning: foreach() argument must be of type array|object, string given in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 794

Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789

Warning: foreach() argument must be of type array|object, string given in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 794

Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789
the_title( string $before = '', string $after = '', bool $display = true )

Displays or retrieves the current post title with optional markup.


Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789

Warning: foreach() argument must be of type array|object, string given in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 794

Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789

Warning: foreach() argument must be of type array|object, string given in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 794

Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789

Warning: foreach() argument must be of type array|object, string given in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 794

Warning: Array to string conversion in /var/www/public/docs.classicpress.net/public_html/wp-content/themes/cpnet-developer/inc/template-tags.php on line 789

Parameters

$before

(Optional) Markup to prepend to the title.

Default value: ''

$after

(Optional) Markup to append to the title.

Default value: ''

$display

(Optional) Whether to echo or return the title. Default true for echo.

Default value: true


Return

(void|string) Void if $display argument is true, current post title if $display is false.


Source

File: wp-includes/post-template.php

function the_title( $before = '', $after = '', $echo = true ) {
	$title = get_the_title();

	if ( strlen($title) == 0 )
		return;

	$title = $before . $title . $after;

	if ( $echo )
		echo $title;
	else
		return $title;
}


Changelog

Changelog
Version Description
0.71 Introduced.