Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




the_title [ WordPress Function ]

the_title ( $before = '', $after = '', $echo = true )
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.
Returns:
  • (null|string) Null on no title. String if $echo parameter is false.
Defined at:



Display or retrieve the current post title with optional content.

Source


<?php
function the_title($before ''$after ''$echo true) {
    
$title get_the_title();

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

    
$title $before $title $after;

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

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics