Definition:
function the_title($before = '', $after = '', $echo = true) {}
Display or retrieve the current post title with optional content.
Parameters
- string $before: Optional. Content to prepend to the title.
- string $after: Optional. Content to append to the title.
- bool $echo: Optional, default to true.Whether to display or return.
Return values
returns:Null on no title. String if $echo parameter is false.
Source code
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; }
3051
No comments yet... Be the first to leave a reply!